Fix reconnect interval reset and timeout logging and add header
This commit is contained in:
parent
312e729eaf
commit
bde12cdec2
|
@ -33,6 +33,7 @@
|
|||
#include <string.h> // strerror()
|
||||
#include <sys/types.h> // time_t size_t
|
||||
#include <unistd.h> // getopt() chdir() close()
|
||||
#include <time.h> // time()
|
||||
|
||||
#define UIRC_IRCV3
|
||||
#define UIRC_HELPERS
|
||||
|
@ -275,8 +276,9 @@ main(int argc, char* argv[])
|
|||
continue;
|
||||
}
|
||||
} else if (connection.info.state == CONN_ACTIVE) {
|
||||
connection.info.reconinter = 0;
|
||||
if (connection.data.timeout > 0 && connection.info.l_message < ctime - connection.data.timeout) {
|
||||
LOG(LOG_WARN, "Timed out because no message was received since %lu.", connection.data.timeout);
|
||||
LOG(LOG_WARN, "Timed out because no message was received since %lu.", connection.info.l_message);
|
||||
connection.info.state = CONN_RECONNECTING;
|
||||
continue;
|
||||
}
|
||||
|
|
Reference in New Issue