binance-java-api icon indicating copy to clipboard operation
binance-java-api copied to clipboard

Cannot close BinanceApiWebSocketClient

Open tonyth00 opened this issue 7 years ago • 2 comments

Using onAggTradeEvent(). Tried closing the stream using close() but the web socket client keeps sending callbacks.

tonyth00 avatar Jan 30 '18 17:01 tonyth00

Try webSocket.close(); wsClient.close();

pantoea avatar Mar 23 '18 04:03 pantoea

WebSocket.close () does not work for me; If you do something webSocketClient.onAggTradeEvent((fromToken + toToken).toLowerCase(), response -> System.out.println(response.getPrice())).close(); then I get an exception java.lang.NullPointerException: Parameter specified as non-null is null: method okhttp3.WebSocketListener.onClosed, parameter reason.

dman-sol avatar Mar 14 '21 09:03 dman-sol