After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784047 - Improve handling of temporarily unavailable networks
Improve handling of temporarily unavailable networks
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-21 16:39 UTC by Florian Müllner
Modified: 2017-06-21 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
telepathyClient: Don't conflate network- with account changes (2.14 KB, patch)
2017-06-21 16:39 UTC, Florian Müllner
committed Details | Review
telepathyClient: Use GNetworkMonitor::network-changed signal (1.88 KB, patch)
2017-06-21 16:39 UTC, Florian Müllner
committed Details | Review
application: Give up on connection failure (1.40 KB, patch)
2017-06-21 16:39 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-06-21 16:39:10 UTC
Some networks are only available under specific conditions, for instance when connected to a private network (directly or via VPN). We shouldn't continuously try to connect to those, see the following patches.
Comment 1 Florian Müllner 2017-06-21 16:39:15 UTC
Created attachment 354171 [details] [review]
telepathyClient: Don't conflate network- with account changes

On startup, we need to pick up both the initial network status
as well as the account status (so we identify the user and
connect rooms when the account is already connected, for
example when restarted after a crash). We currently cover
both cases when handling changes to the network availability,
however as we are about to monitor more network changes, we
may end up reinitializing accounts that are already connected.
While that shouldn't break anything, we can avoid the unnecessary
work by handling network- and account status initialization
separately.
Comment 2 Florian Müllner 2017-06-21 16:39:21 UTC
Created attachment 354172 [details] [review]
telepathyClient: Use GNetworkMonitor::network-changed signal

Unlike notify::network-available that is emitted when the availability
of a default route changes, ::network-changed is emitted on any network
changes, for example when previously unavailable ranges become available
after connecting to a VPN network. As this may well be the reason for a
previous connection failure, it makes sense for us to reconnect accounts
in response.
Comment 3 Florian Müllner 2017-06-21 16:39:26 UTC
Created attachment 354173 [details] [review]
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.
Comment 4 Florian Müllner 2017-06-21 16:45:51 UTC
Attachment 354171 [details] pushed as a9ed3bb - telepathyClient: Don't conflate network- with account changes
Attachment 354172 [details] pushed as 4e6929e - telepathyClient: Use GNetworkMonitor::network-changed signal
Attachment 354173 [details] pushed as c1b46a0 - application: Give up on connection failure