-
Notifications
You must be signed in to change notification settings - Fork 99
How do I close a websocket after I get the info I need. #97
Comments
|
I just tried this and it does trigger the onDisconnect. However after that the websocket connects again. So it looks like this:
and it continues to do this. |
You'll have to hook onto the
|
I'm sorry I'm pretty new to this but I don't know what you mean by "hook onto". Do I just need to put that line of code somewhere or do more than that? |
Put it after |
Thank you for your help on this but I'm still getting the same result with this:
|
Maybe replace "true" with "false"... websocketClient.serviceHandlers.reconnecting = () => false; |
Still get the same result @vinnie035 |
Try that:
|
I have tried putting that in my options after my key and secret and that does not work either. @vinnie035 |
Calling |
@khuezy it does close the connect but it reconnects right away. And none of these methods to turn off autoReconnect have worked. |
I know this is old but the key is disabling the
@danschnettler: if you never want to use If you're still having trouble feel free to post the code so we can take a look. |
I am testing this for the next release. There are issues with multiple disconnections/reconnections - once I resolve that it will go out. |
Sorry not directly related to this problem, but I like to log when websocket is trying to reconnect after it has been disconnected. Any suggestion is appreciated. |
I don't see any documentation on how to close the websockets. Is there a way to implement code that would look like this?
The text was updated successfully, but these errors were encountered: