提交 973c5fa0 作者: Jeromy

update go-peerstream to newest version

License: MIT
Signed-off-by: 's avatarJeromy <jeromyj@gmail.com>
上级 c77a96fe
......@@ -167,7 +167,7 @@
},
{
"ImportPath": "github.com/jbenet/go-peerstream",
"Rev": "214e6057e1c0742c0b5f9bb3060e88dea32a4380"
"Rev": "cfdc29a19c1a209d548670f5c33c5cda2e040143"
},
{
"ImportPath": "github.com/jbenet/go-random",
......
......@@ -323,6 +323,8 @@ func (s *Swarm) StreamsWithGroup(g Group) []*Stream {
// Close shuts down the Swarm, and it's listeners.
func (s *Swarm) Close() error {
defer close(s.closed)
// automatically close everything new we get.
s.SetConnHandler(func(c *Conn) { c.Close() })
s.SetStreamHandler(func(s *Stream) { s.Close() })
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论