Skip to content
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

[Fix] Conn.Close stops all goroutines if we haven't connencted yet #55

Merged
merged 1 commit into from
Mar 28, 2015

Conversation

noxiouz
Copy link
Contributor

@noxiouz noxiouz commented Mar 28, 2015

Without that patch Conn.Close cannot interrupt Conn.connect.
So it's impossible to dispose two goroutines related to a connection,
if the connection hasn't been established yet.

Also I changed types of the broadcast channels. It's idiomatics to use chan struct{} to broadcast than chan bool

Without that patch Conn.Close cannot interrupt Conn.connect.
So it's impossible to dispose two goroutines related to a connection,
if the connection hasn't been established yet.

Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
@noxiouz noxiouz changed the title [Fix] Conn.Close stops all goroutines if we haven't conencted yet [Fix] Conn.Close stops all goroutines if we haven't connencted yet Mar 28, 2015
@samuel
Copy link
Owner

samuel commented Mar 28, 2015

Good catch and patch looks great. Thanks!

samuel added a commit that referenced this pull request Mar 28, 2015
[Fix] Conn.Close stops all goroutines if we haven't connencted yet
@samuel samuel merged commit f7d698c into samuel:master Mar 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants