Potential dead lock for Listen ?
leslie-wang opened this issue · comments
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?