don't hold the lock when closing
In libp2p, Close is assumed to be threadsafe and we'd like to interrupt in-progress reads/writes. As a matter of fact, we're lucky this hasn't caused close to hang. If we had tried to close the reader before closing the writer, we would have blocked on a concurrent read call. Part of ipfs/go-ipfs#2823
Showing
Please register or sign in to comment