Skip to content

Commit 34053fc

Browse files
had removed the reconnect logic. added that back in.
1 parent f075960 commit 34053fc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

main.go

+7-5
Original file line numberDiff line numberDiff line change
@@ -1541,11 +1541,13 @@ func runIRC(appConfig TomlConfig) {
15411541
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(appConfig.MillaReconnectDelay)*time.Second)
15421542
defer cancel()
15431543

1544-
_, err := backoff.Retry(ctx, connectToIRC, backoff.WithBackOff(backoff.NewExponentialBackOff()))
1545-
if err != nil {
1546-
LogError(err)
1547-
} else {
1548-
return
1544+
for {
1545+
_, err := backoff.Retry(ctx, connectToIRC, backoff.WithBackOff(backoff.NewExponentialBackOff()))
1546+
if err != nil {
1547+
LogError(err)
1548+
} else {
1549+
return
1550+
}
15491551
}
15501552
}
15511553

0 commit comments

Comments
 (0)