]> git.sur5r.net Git - i3/i3/commitdiff
Stop the reconn-timer before starting it again, else it's running twice
authorAxel Wagner <mail@merovius.de>
Thu, 14 Jul 2011 23:31:02 +0000 (01:31 +0200)
committerAxel Wagner <mail@merovius.de>
Thu, 14 Jul 2011 23:31:02 +0000 (01:31 +0200)
i3bar/src/ipc.c

index 2f5d481c70b43c1c4ac4aa817b71a89f65c4df69..6bfbc3ecd1167108e46b1c64fe1cfcca0a529850 100644 (file)
@@ -57,6 +57,8 @@ void reconnect() {
             ELOG("malloc() failed: %s\n", strerror(errno));
             exit(EXIT_FAILURE);
         }
+    } else {
+        ev_timer_stop(main_loop, reconn);
     }
     ev_timer_init(reconn, retry_connection, 0.25, 0.25);
     ev_timer_start(main_loop, reconn);