Try to recognize email websocket going away
This commit is contained in:
parent
7a0a3c887b
commit
9d1063187a
1 changed files with 6 additions and 0 deletions
|
|
@ -80,6 +80,12 @@ func StartWebsocket(ctx context.Context, username, password string) {
|
|||
time.Sleep(10 * time.Second)
|
||||
continue
|
||||
}
|
||||
if websocket.IsCloseError(err, websocket.CloseGoingAway) {
|
||||
conn = nil
|
||||
log.Info().Msg("email websocket server going away")
|
||||
time.Sleep(60 * time.Second)
|
||||
continue
|
||||
}
|
||||
log.Error().Err(err).Msg("Error reading message")
|
||||
time.Sleep(10 * time.Second)
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue