From 93900b8f263dc5aadc3bea0c5d510413f6416786 Mon Sep 17 00:00:00 2001 From: linstohu Date: Tue, 26 Dec 2023 10:38:26 +0800 Subject: [PATCH] fix: stopCtx nil pointer when ws client is closed --- binance/coinmfutures/websocketmarket/client.go | 1 - binance/europeanoptions/websocketmarket/client.go | 1 - binance/europeanoptions/websocketuserdata/client.go | 1 - binance/spot/websocketmarket/client.go | 1 - binance/usdmfutures/websocketmarket/client.go | 1 - htx/spot/accountws/client.go | 1 - htx/spot/marketws/client.go | 1 - htx/usdm/accountws/client.go | 1 - htx/usdm/marketws/client.go | 1 - woox/websocket/client.go | 1 - 10 files changed, 10 deletions(-) diff --git a/binance/coinmfutures/websocketmarket/client.go b/binance/coinmfutures/websocketmarket/client.go index 14b8dea..78c7c40 100644 --- a/binance/coinmfutures/websocketmarket/client.go +++ b/binance/coinmfutures/websocketmarket/client.go @@ -109,7 +109,6 @@ func (u *CoinMarginedMarketStreamClient) Close() error { } u.cancel() - u.stopCtx = nil return nil } diff --git a/binance/europeanoptions/websocketmarket/client.go b/binance/europeanoptions/websocketmarket/client.go index 1d4e5c1..68fbae7 100644 --- a/binance/europeanoptions/websocketmarket/client.go +++ b/binance/europeanoptions/websocketmarket/client.go @@ -109,7 +109,6 @@ func (o *OptionsMarketStreamClient) Close() error { } o.cancel() - o.stopCtx = nil return nil } diff --git a/binance/europeanoptions/websocketuserdata/client.go b/binance/europeanoptions/websocketuserdata/client.go index 38d3497..9813595 100644 --- a/binance/europeanoptions/websocketuserdata/client.go +++ b/binance/europeanoptions/websocketuserdata/client.go @@ -112,7 +112,6 @@ func (o *OptionsUserDataStreamClient) Close() error { } o.cancel() - o.stopCtx = nil return nil } diff --git a/binance/spot/websocketmarket/client.go b/binance/spot/websocketmarket/client.go index d34ceec..4c808f0 100644 --- a/binance/spot/websocketmarket/client.go +++ b/binance/spot/websocketmarket/client.go @@ -109,7 +109,6 @@ func (m *SpotMarketStreamClient) Close() error { } m.cancel() - m.stopCtx = nil return nil } diff --git a/binance/usdmfutures/websocketmarket/client.go b/binance/usdmfutures/websocketmarket/client.go index f60a745..1bb5de1 100644 --- a/binance/usdmfutures/websocketmarket/client.go +++ b/binance/usdmfutures/websocketmarket/client.go @@ -109,7 +109,6 @@ func (u *USDMarginedMarketStreamClient) Close() error { } u.cancel() - u.stopCtx = nil return nil } diff --git a/htx/spot/accountws/client.go b/htx/spot/accountws/client.go index 79c1c10..f437966 100644 --- a/htx/spot/accountws/client.go +++ b/htx/spot/accountws/client.go @@ -129,7 +129,6 @@ func (m *AccountWsClient) Close() error { } m.cancel() - m.stopCtx = nil return nil } diff --git a/htx/spot/marketws/client.go b/htx/spot/marketws/client.go index 181aee8..66514dd 100644 --- a/htx/spot/marketws/client.go +++ b/htx/spot/marketws/client.go @@ -111,7 +111,6 @@ func (m *MarketWsClient) Close() error { } m.cancel() - m.stopCtx = nil return nil } diff --git a/htx/usdm/accountws/client.go b/htx/usdm/accountws/client.go index f15eeab..f8de58f 100644 --- a/htx/usdm/accountws/client.go +++ b/htx/usdm/accountws/client.go @@ -132,7 +132,6 @@ func (m *AccountWsClient) Close() error { } m.cancel() - m.stopCtx = nil return nil } diff --git a/htx/usdm/marketws/client.go b/htx/usdm/marketws/client.go index ee1893d..b4f8165 100644 --- a/htx/usdm/marketws/client.go +++ b/htx/usdm/marketws/client.go @@ -111,7 +111,6 @@ func (m *MarketWsClient) Close() error { } m.cancel() - m.stopCtx = nil return nil } diff --git a/woox/websocket/client.go b/woox/websocket/client.go index 00adaef..76e6d41 100644 --- a/woox/websocket/client.go +++ b/woox/websocket/client.go @@ -121,7 +121,6 @@ func (w *WooXWebsocketClient) Close() error { } w.cancel() - w.stopCtx = nil return nil }