Issue with reestablishing an SSL connection #15526
Replies: 2 comments 3 replies
-
this is due to
|
Beta Was this translation helpful? Give feedback.
-
The root cause of this issue was discovered. A fix has been implemented by @projectgus : |
Beta Was this translation helpful? Give feedback.
-
I have an issue with reestablishing an MQTT SSL connection after the system has been running for some time.
I can successfully establish an MQTT connection from the client to the broker defining
ssl.SSLContext()
. When the connection breaks I try to reconnect. This fails in some cases with this traceback:I understand that this is a memory issue (probably caused by fragmentation), but why does the traceback point to line 1 of
ssl.py
? This line is the import of the TLS library:import tls
The classes
wrap_socket()
function which causes the error starts at line 33 ofssl.py
.So I am wondering why the import of the TLS lib would cause memory error. It should have been included already when creating
ssl.SSLContext()
. If I understand this correctly, the whole point of usingssl.SSLContext()
is that we don't have to recreate this for each new connection attempt. Therefore I don't expect memory error whenconnect()
andwrap_socket()
is called again.Can anyone please shed some light on this?
Beta Was this translation helpful? Give feedback.
All reactions