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



commit 5d270b8f613eae9d922cc55b0dd46bf5c16e89df
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]