Closed windmeup closed 2 years ago
Ah yeah, I can see that locking you into that connection loop.
I think this could be solved by making the client Context aware in the library and handling manual disconnects through that.
For now, if want to disconnect, have to wait the connection active. Consider the reconnect loop exists, it's little more complicated. I think add something like dispose, may be convenient when some one want to shutdown the chatbot application at any time.
When client.Disconnect() throw ErrConnectionIsNotOpen, there is no other way to break client.Connect() loop. Add a method to do this mybe convenient.