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

Potential dead lock for Listen ? #1

Open
leslie-wang opened this issue Mar 29, 2019 · 0 comments
Open

Potential dead lock for Listen ? #1

leslie-wang opened this issue Mar 29, 2019 · 0 comments

Comments

@leslie-wang
Copy link

Thanks for making the great project, and hosting the website kindly!

I'd like to use the go library, but seems like sometimes it got deadlock if remote connection is refused. I checked the code, seems like https://github.com/localtunnel/go-localtunnel/blob/master/listener.go#L90 starts proxy go routine, then wait for dial successful. Because mutex is unlocked only if counter is increased, https://github.com/localtunnel/go-localtunnel/blob/master/util.go#L27, but Add method is potentiall also trying to get mutex to increase counter. Seems like it may get in deadlock mode. Is it correct?

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

No branches or pull requests

1 participant