hirc

IRC client
Log | Files | Refs

commit 7bced859ecbb463d5f68d62723329fe8dc10c2de
parent 56dcbf0cd45afb223365d8c27048cb62b45d19f8
Author: hhvn <dev@hhvn.uk>
Date:   Mon,  2 May 2022 13:44:47 +0100

Use reconnect.maxinterval in main loop

Diffstat:
Msrc/main.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c @@ -127,7 +127,8 @@ main(int argc, char *argv[]) { "SELF_CONNECTLOST %s %s %s :No ping reply in %d seconds", sp->name, sp->host, sp->port, pinginact); } else if (sp->status == ConnStatus_notconnected && sp->reconnect && - (time(NULL) - sp->lastconnected) >= (sp->connectfail * reconnectinterval)) { + ((time(NULL) - sp->lastconnected) >= maxreconnectinterval || + (time(NULL) - sp->lastconnected) >= (sp->connectfail * reconnectinterval))) { /* time since last connected is sufficient to initiate reconnect */ serv_connect(sp); }