1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-29 01:12:24 +08:00

updated go-peerstream (close fix)

This commit is contained in:
Juan Batiz-Benet
2014-12-28 03:59:40 -08:00
parent 7e0ea18e79
commit 5c2cc6089f
2 changed files with 7 additions and 2 deletions

2
Godeps/Godeps.json generated
View File

@ -141,7 +141,7 @@
},
{
"ImportPath": "github.com/jbenet/go-peerstream",
"Rev": "1c71a3e04eeef9297a12ecdff75a0b28ffa8bf90"
"Rev": "fc6b2a964210945ae2325e6678898d2222526f00"
},
{
"ImportPath": "github.com/jbenet/go-random",

View File

@ -235,7 +235,12 @@ func (s *Swarm) removeStream(stream *Stream) error {
s.streamLock.Unlock()
stream.conn.streamLock.Unlock()
return stream.ssStream.Close()
// Reset is spdystream's full bidirectional close.
// We expose bidirectional close as our `Close`.
// To close only half of the connection, and use other
// spdystream options, just get the stream with:
// stream.SPDYStream()
return stream.ssStream.Reset()
}
func (s *Swarm) removeConn(conn *Conn) error {