bubbleboy14
bubbleboy14
@milosivanovic for that, use the "reconnect" kwarg, eg: ws.run_forever(reconnect=5) In the above example, 5 is the reconnect interval, so if the connection drops, it will be re-established 5 seconds later....
Regarding the threading/rel conflict, @pouya817, what's the error? The reconnect issue is with your run_forever() kwargs. In particular, you currently have True for reconnect, but that should be an integer...
@reasadazim @tushargoyal22 that's odd. Are you sure you're using the latest version of websocket-client? Could you please provide a concise test case that reproduces the issue?
Looks like this line should be conditionalized: https://github.com/websocket-client/websocket-client/blob/a394b46c560cb78672f95bbb3836305e8511d1b9/websocket/_app.py#L500 What do you think @engn33r ? For starters, we could just set a flag the _first_ time _callback(on_open) gets called from setSock(),...
I made a branch: https://github.com/websocket-client/websocket-client/tree/t971 It just uses setSock()'s reconnecting kwarg to decide between on_open and on_reconnect callbacks. @NadavK I hope this helps shed light on the issue you're debugging....
@NadavK if you have a minimal test case (ideally client and server) that reproduces this issue, I can take a look.
I tweaked that branch to preserve the current behavior (of calling on_open on reconnect) unless on_reconnect is defined, and made a PR: https://github.com/websocket-client/websocket-client/pull/972 @engn33r what are your thoughts? I'm starting...
No problem at all @NadavK, I'm glad you brought this to my attention! I think this is a pretty important distinction for our callback system to take into account.
@jeanbmar a custom dispatcher (such as rel) would generally be used in the context of async applications. The most obvious use case is running multiple WebSocketApp instances without mucking around...
@gborrageiro-ld thanks for the detailed report! Do you get the same SSLEOFError with the default (unspecified) dispatcher - that is, connected to the same endpoint, but without rel? Also, since...