[polari] application: Give up on connection failure
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] application: Give up on connection failure
- Date: Wed, 21 Jun 2017 16:45:48 +0000 (UTC)
commit c1b46a08c5d97680939fd6d9dd6354d7a60d9f89
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jun 21 00:09:24 2017 +0200
application: Give up on connection failure
We do the best we can to establish a connection, if the connection still
fails, then retrying endlessly is unlikely to turn up a different result.
Except that telepathy apparently disagrees, and keeps trying anyway;
stop it from doing that by explicitly setting the presence to offline,
until the network changes and it becomes worth checking again.
https://bugzilla.gnome.org/show_bug.cgi?id=784047
src/application.js | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index d73f6fe..1554c47 100644
--- a/src/application.js
+++ b/src/application.js
@@ -528,6 +528,11 @@ const Application = new Lang.Class({
let strReasons = Object.keys(Tp.ConnectionStatusReason);
debug('Account %s disconnected with reason %s'.format(
account.display_name, strReasons[reason]));
+
+ // Connection failed, keep tp from retrying over and over
+ let presence = Tp.ConnectionPresenceType.OFFLINE;
+ let msg = account.requested_status_message;
+ account.request_presence_async(presence, 'offline', msg, null);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]