Closed nika90426 closed 3 years ago
Hi @nika90426, maybe you could provide a PR with your proposal? I think that would be helpfull :)
@nika90426 Hi. Thank you for your feedback. If it is possible please make PR for the fix.
I've observed this issue for a while, and finally I find that I was wrong. I'm sorry for my mistake, and thank you for nice project again!
Hi, thanks for nice project! I found BeginConnect(), BeginDisconnect() function have a synchronization problem when they are each called from different thread. BeginConnection() caused MtConnectionException on this line in MtApiClient.cs (SendCommand in details)
After some debugging, I found its because of connect() and disconnect() are not fully synchronized. This shows the part of connect() function
After all I resolved it by moving the function call to the earlier line in the lock guard like this.
I hope this might help you. Thank you!