Commit aec1a9fa authored by Steven Allen's avatar Steven Allen

block while writing

Make sure to wait until we're done writing before returning. The close should
interrupt this process but we should still wait.

might be related to https://github.com/ipfs/go-ipfs/issues/6197
parent 6cccee85
......@@ -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