Skip to content
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

KeepAliveTimeout option causes multiple connections to be created and orphaned #20

Open
jotto opened this issue Nov 8, 2019 · 3 comments · May be fixed by #56
Open

KeepAliveTimeout option causes multiple connections to be created and orphaned #20

jotto opened this issue Nov 8, 2019 · 3 comments · May be fixed by #56

Comments

@jotto
Copy link

jotto commented Nov 8, 2019

If you're blocking on ReadMessage(), while the goroutine for KeepAliveTimeout fires a closeAndReconnect, the ReadMessage will fire a second closeAndReconnect. This causes more and more connections to be created and orphaned.

@ihorserba
Copy link

ihorserba commented Jan 29, 2021

The root cause of the bug is simultaneous running of the connect goroutines.
Please take a look at #34 - should be fixed there.

@icamys
Copy link

icamys commented Apr 16, 2022

The issue is still present

@free6k free6k linked a pull request Jan 6, 2023 that will close this issue
@free6k
Copy link

free6k commented Jan 6, 2023

Please look my pr #56

Here problem in twice call go connect()

  • first from method keepAlive(), the timer channel waiting can call any time, because of this close() method doesn't work, if use keepAlive()
  • second from any place there have call CloseAndReconnect() method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants