Skip to content

Commit

Permalink
Merge pull request #10 from libp2p/fix/block-while-writing
Browse files Browse the repository at this point in the history
block while writing
  • Loading branch information
Stebalien committed Apr 26, 2019
2 parents 5a60c83 + 085f98a commit 1de116d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions p2p/net/conn-security-multistream/ssms.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

0 comments on commit 1de116d

Please sign in to comment.