Stop the reconn-timer before starting it again, else it's running twice
This commit is contained in:
parent
3d05fe7a52
commit
8734337fb5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue