Unverified Commit 93a5f4da authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #10 from libp2p/fix/block-while-writing

block while writing
parents 6cccee85 aec1a9fa
......@@ -82,6 +82,7 @@ func (sm *SSMuxer) selectProto(ctx context.Context, insecure net.Conn, server bo
// We *must* do this. We have outstanding work on the connection
// and it's no longer safe to use.
insecure.Close()
<-done // wait to stop using the connection.
return nil, ctx.Err()
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment