[geary/wip/conversation-polish: 10/26] Fix units in calculating next check in ConnectivityManager



commit 6b9e08ba3dc204be5ec3397277c66a02113baddc
Author: Michael Gratton <mike vee net>
Date:   Thu Jan 24 18:59:27 2019 +1100

    Fix units in calculating next check in ConnectivityManager

 src/engine/util/util-connectivity-manager.vala | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/engine/util/util-connectivity-manager.vala b/src/engine/util/util-connectivity-manager.vala
index fdd4ce5f..c683323f 100644
--- a/src/engine/util/util-connectivity-manager.vala
+++ b/src/engine/util/util-connectivity-manager.vala
@@ -110,7 +110,9 @@ public class Geary.ConnectivityManager : BaseObject {
             is_reachable = yield this.monitor.can_reach_async(
                                this.remote, cancellable
                        );
-            this.next_check = get_real_time() + CHECK_QUIESCENCE_MS;
+            this.next_check = (
+                GLib.get_real_time() + (CHECK_QUIESCENCE_MS * 1000)
+            );
         } catch (GLib.IOError.CANCELLED err) {
             // User cancelled, so leave as unreachable
         } catch (GLib.DBusError err) {
@@ -188,7 +190,7 @@ public class Geary.ConnectivityManager : BaseObject {
             // issue in Bug 776042.
             if (this.is_reachable.is_uncertain() ||
                 this.existing_check != null ||
-                this.next_check <= get_real_time()) {
+                this.next_check <= GLib.get_real_time()) {
                 this.check_reachable.begin();
             } else if (!this.delayed_check.is_running) {
                 this.delayed_check.start();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]