Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.2.0-alpha40: AggregateTradeWebSocketClient.Unsubscribe() doesn't close the socket #76

Closed
rakewell opened this issue Mar 9, 2018 · 2 comments
Assignees
Labels

Comments

@rakewell
Copy link

rakewell commented Mar 9, 2018

This can be tested on your demo console application:

Test console application using following commands:

live aggtrades btcusdt
live aggtrades btcusdt off

console output (after off):

info: Binance.WebSocket.DefaultWebSocketClient[0]
      DefaultWebSocketClient.OnClose: Web Socket CLOSED.
info: Binance.WebSocket.BinanceWebSocketStream[0]
      WebSocketStream.StreamActionAsync: End streaming...
      "wss://stream.binance.com:9443/ws/btcusdt@aggTrade"

Make the following changes to LiveAggregateTrades:

Change the line:

Program.ClientManager.AggregateTradeClient.Unsubscribe(symbol);

to

Program.ClientManager.AggregateTradeClient.Unsubscribe();

run the program with the same commands:
live aggtrades btcusdt
live aggtrades btcusdt off

console output (after off):
...live aggregate trades feed DISABLED for symbol: btcusdt

there is no log indicating that the web socket is closed and the websocket IsOpen and IsStreaming properties return true.

@sonvister sonvister added the bug label Mar 9, 2018
@sonvister sonvister self-assigned this Mar 9, 2018
@sonvister
Copy link
Owner

@rakewell, thanks, I see the issue and have a fix.

@rakewell
Copy link
Author

rakewell commented Mar 9, 2018

thanks @sonvister, works great now.

@rakewell rakewell closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants