Closed DenisDes closed 2 years ago
Please share a minimum, reproducible, example. The most likely issue is as follows (from common problems), but you have not shared enough code to confirm this:
A MessageHandler (called when a new message is received) must not block (unless ClientOptions.SetOrderMatters(false) set). If you wish to perform a long-running task, or publish a message, then please use a go routine (blocking in the handler is a common cause of unexpected pingresp not received, disconnecting errors).
Please share a minimum, reproducible, example. The most likely issue is as follows (from common problems), but you have not shared enough code to confirm this:
A MessageHandler (called when a new message is received) must not block (unless ClientOptions.SetOrderMatters(false) set). If you wish to perform a long-running task, or publish a message, then please use a go routine (blocking in the handler is a common cause of unexpected pingresp not received, disconnecting errors).
you were right, the problem was with the blocking of the subscription handler, I apologize for the inconvenience and thank you very much!
Closing as per OPs comment.
I'm trying to use the client with default settings.
This is the example code:
After 3-5 minutes in the logs, I see this:
in client.go:672: c.workers.Wait() will never complete: