-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logging and optional callback to buffer fills #297
Conversation
Slow client related issues: * `client.maintainConnection` waits for the `messageProcessor` goroutine(s) to finish to reconnect: this delays the reconnect and more messages will be missed * whenever the client buffer `c.in` is full the `connReader` goroutine is blocked
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than my hope that someday we can become diligent about having tests for most code changes, and a couple of naming nits, this looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @leki75 !
Slow client related issues:
client.maintainConnection
waits for themessageProcessor
goroutine(s) to finish to reconnect: this delays the reconnect and more messages can be missedc.in
is full theconnReader
goroutine is blocked: the TCP stack of the operating system will buffer the messages and can cause disconnects if the application gets the pong message late, moreover theconnReader
goroutine will not exit if the context is cancelled while it is blocked on writing toc.in