mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
types: do not return for normal closure
This commit is contained in:
parent
aa33836fb3
commit
47e398abc3
|
@ -203,14 +203,12 @@ func (s *StandardStream) Read(ctx context.Context, conn *websocket.Conn, cancel
|
|||
|
||||
// if it's a websocket related error
|
||||
case *websocket.CloseError:
|
||||
if err.Code == websocket.CloseNormalClosure {
|
||||
return
|
||||
if err.Code != websocket.CloseNormalClosure {
|
||||
log.WithError(err).Errorf("websocket error abnormal close: %+v", err)
|
||||
}
|
||||
|
||||
log.WithError(err).Errorf("websocket error abnormal close: %+v", err)
|
||||
|
||||
_ = conn.Close()
|
||||
// for unexpected close error, we should re-connect
|
||||
// for close error, we should re-connect
|
||||
// emit reconnect to start a new connection
|
||||
s.Reconnect()
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue
Block a user