提交 c41a9717 作者: Jeromy 提交者: Juan Batiz-Benet

make disconnects and reconnects work a little better

上级 da1890e5
......@@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"os"
"runtime/pprof"
"runtime"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
......
......@@ -229,6 +229,8 @@ func (s *SecurePipe) handleSecureIn(hashType string, tIV, tCKey, tMKey []byte) {
for {
data, ok := <-s.insecure.In
if !ok {
u.DOut("Closing incoming proxy.\n")
close(secureIn)
return
}
......@@ -265,6 +267,8 @@ func (s *SecurePipe) handleSecureOut(hashType string, mIV, mCKey, mMKey []byte)
for {
data, ok := <-s.Out
if !ok {
u.DOut("Closing outgoing proxy.\n")
close(secureOut)
return
}
......
......@@ -168,6 +168,7 @@ func Mount(ipfs *core.IpfsNode, fpath string) error {
}
time.Sleep(time.Millisecond * 10)
}
ipfs.Swarm.Close()
}()
c, err := fuse.Mount(fpath)
......
......@@ -38,6 +38,7 @@ func (s *Resolver) ResolvePath(fpath string) (*merkledag.Node, error) {
// first element in the path is a b58 hash (for now)
h, err := mh.FromB58String(parts[0])
if err != nil {
u.DOut("given path element is not a base58 string.\n")
return nil, err
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论