diff options
Diffstat (limited to 'libdino/src/service/connection_manager.vala')
-rw-r--r-- | libdino/src/service/connection_manager.vala | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libdino/src/service/connection_manager.vala b/libdino/src/service/connection_manager.vala index d114b9ae..43580c06 100644 --- a/libdino/src/service/connection_manager.vala +++ b/libdino/src/service/connection_manager.vala @@ -104,10 +104,14 @@ public class ConnectionManager : Object { network_monitor.network_changed.connect(on_network_changed); network_monitor.notify["connectivity"].connect(on_network_changed); } - login1 = get_login1(); - if (login1 != null) { - login1.PrepareForSleep.connect(on_prepare_for_sleep); - } + + get_login1.begin((_, res) => { + login1 = get_login1.end(res); + if (login1 != null) { + login1.PrepareForSleep.connect(on_prepare_for_sleep); + } + }); + Timeout.add_seconds(60, () => { foreach (Account account in connections.keys) { if (connections[account].last_activity != null && |