Stop the reconn-timer before starting it again, else it's running twice

next
Axel Wagner 2011-07-15 01:31:02 +02:00
parent 3d05fe7a52
commit 8734337fb5
1 changed files with 2 additions and 0 deletions

View 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);