开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Re: C++ - TWS API - Connection Closed Handling


 

I tried to reach out to you individually to send me your code as I cannot replicate the test you are doing with TestCppClient example. The example code connects and disconnects rapidly 50 times in a loop so how did you modify the code to stay connected and make your "disconnect" manually from TWS?
?
Code related to the EReader & EClientSocket was changed a few revisions ago to fix a bug with the hanging of a thread when an unexpected disconnect occurred. This error had been there since the beginning of the API so it is possible that some workarounds had been built into the source of the examples which are no longer needed or actually cause problems.
?
Anyway, if you could share how you did your disconnect test I will try to replicate it and check it.
?
If you want to send a? source file I suggest you send it directly to me rather than posting it.

Join [email protected] to automatically receive all group messages.