From: Axel Wagner Date: Thu, 14 Jul 2011 23:31:02 +0000 (+0200) Subject: Stop the reconn-timer before starting it again, else it's running twice X-Git-Tag: 4.0.1~7^2~3^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8734337fb5ae85de42db2feb3c5f97491fde04e2;p=i3%2Fi3 Stop the reconn-timer before starting it again, else it's running twice --- diff --git a/i3bar/src/ipc.c b/i3bar/src/ipc.c index 2f5d481c..6bfbc3ec 100644 --- a/i3bar/src/ipc.c +++ b/i3bar/src/ipc.c @@ -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);