You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was working fine for us. However, I've had to amend the Thread line as follows, to stop the connection carrying out SSL certificate checks: wst=threading.Thread(target=ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}))
The program now successfully makes a connection to the server but never closes.
I've tried explicitly closing the connection with ws.close(), but no luck.
Two questions:
is this expected behaviour - i.e. does bypassing ssl certificate checks mean that the connection will not close?
how can I force the connection to close (after active_time seconds)?
The text was updated successfully, but these errors were encountered:
No, this is not expected. The only logic that should be associated with this cert_reqs value are in _wrap_sni_socket in _http.py
You can use a ping_timeout to close the connection if there is no response from the server after a certain time. If you want to close the connection even though the server is responding, you should handle it in on_message or a similar callback.
Please make sure you are using the latest version of the library and consider checking issues #612 and #592 related to closing a connection.
I have inherited a program that makes a websocket connection to a server, reads messages from a queue then closes:
This was working fine for us. However, I've had to amend the Thread line as follows, to stop the connection carrying out SSL certificate checks:
wst=threading.Thread(target=ws.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}))
The program now successfully makes a connection to the server but never closes.
I've tried explicitly closing the connection with ws.close(), but no luck.
Two questions:
The text was updated successfully, but these errors were encountered: