Closed catmemo closed 2 years ago
It looks like you have 3 different client that uses the same connection.
When the client exit, at the end of the with
block, the connection is closed and the other clients can't use the conenction.
You should have a global client instead of a global connection. Open the client (and the connection) at the beggining of the program, and exit then client at the very end. Everything in between will use the client.
Since you seem to be using threads, you will need to ensure that the client is not waiting for a response before sending a request. Mutex will be needed here.
OK, I'll try, thank you very much!
Please check below issue:
my Send_Diag_Command.py
and my main.py:
Could you please help to check? Any questions please let me know, thanks~