Sleep actual 10 seconds on email connection error
This commit is contained in:
parent
da229592f5
commit
66c0da1bbe
1 changed files with 2 additions and 2 deletions
|
|
@ -77,11 +77,11 @@ func StartWebsocket(ctx context.Context, username, password string) {
|
||||||
if websocket.IsCloseError(err, websocket.CloseNormalClosure) {
|
if websocket.IsCloseError(err, websocket.CloseNormalClosure) {
|
||||||
conn = nil
|
conn = nil
|
||||||
log.Info().Msg("email websocket closed, waiting and reconnecting")
|
log.Info().Msg("email websocket closed, waiting and reconnecting")
|
||||||
time.Sleep(10000)
|
time.Sleep(10 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Error().Err(err).Msg("Error reading message")
|
log.Error().Err(err).Msg("Error reading message")
|
||||||
time.Sleep(10000)
|
time.Sleep(10 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err = handleMessage(ctx, message_type, message)
|
err = handleMessage(ctx, message_type, message)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue