diff --git a/v5_ws_private.go b/v5_ws_private.go index a1c0bdb..17cc794 100644 --- a/v5_ws_private.go +++ b/v5_ws_private.go @@ -132,6 +132,7 @@ func (s *V5WebsocketPrivateService) Start(ctx context.Context, errHandler ErrHan defer close(done) defer s.connection.Close() _ = s.connection.SetReadDeadline(time.Now().Add(60 * time.Second)) + _ = s.connection.SetWriteDeadline(time.Now().Add(60 * time.Second)) s.connection.SetPongHandler(func(string) error { _ = s.connection.SetReadDeadline(time.Now().Add(60 * time.Second)) return nil diff --git a/v5_ws_trade.go b/v5_ws_trade.go index 4d0d2bc..167d0a7 100644 --- a/v5_ws_trade.go +++ b/v5_ws_trade.go @@ -84,6 +84,7 @@ func (s *V5WebsocketTradeService) Start(ctx context.Context, errHandler ErrHandl defer close(done) defer s.connection.Close() _ = s.connection.SetReadDeadline(time.Now().Add(60 * time.Second)) + _ = s.connection.SetWriteDeadline(time.Now().Add(60 * time.Second)) s.connection.SetPongHandler(func(string) error { _ = s.connection.SetReadDeadline(time.Now().Add(60 * time.Second)) return nil