Open wildbiotiger opened 1 year ago
@wildbiotiger sorry for the delay in responding to this. I have recreated this and I believe you are correct: that error should not prevent a successful reconnect. I will submit a branch shortly. If it works I will submit a PR to merge it and will release a new PyPi module. I'll keep you posted.
@wildbiotiger I just pushed branch prevent-connection-error-when-tls-already-configured
which should fix this. Can you try running with the branch to see if it works for you?
To run from source you should do the following:
import sys
path_to_clearblade_module = "/path/to/your/clearblade/module"
sys.path.insert(0, path_to_clearblade_module)
from clearblade.ClearBladeCore import System, cbLogs
This should use the module from source. You can check by throwing a few print statements in the cloned repo code to see that they are being called. If you find you are NOT running the module from source then perhaps you could temporarily uninstall the PyPi module using...
python3 -m pip uninstall clearblade
...or the equivalent?
Let us know if this branch works for you. If so I'll merge the changes into the main branch and release a new version of the PyPi module and let you know.
@wildbiotiger did you try this branch? Did it work for you? If it worked I would like to merge the branch.
@sky-sharma not yet, the bug isn't on the critical path for me just yet. And the hardware is now deployed out in the field. Will need to test later.
It seems that when Messaging.connect() is called with use_tls and times out (no network connectivity), calling connect() again results in a persistent error:
ValueError('SSL/TLS has already been configured.')
which prevent a successful reconnect. Shouldn't connect be able to be called repeatedly? Or is there some other reconnect workflow that's missing here?