提交 5c2cc608 作者: Juan Batiz-Benet

updated go-peerstream (close fix)

上级 7e0ea18e
......@@ -141,7 +141,7 @@
},
{
"ImportPath": "github.com/jbenet/go-peerstream",
"Rev": "1c71a3e04eeef9297a12ecdff75a0b28ffa8bf90"
"Rev": "fc6b2a964210945ae2325e6678898d2222526f00"
},
{
"ImportPath": "github.com/jbenet/go-random",
......
......@@ -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 {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论