make disconnects and reconnects work a little better
Jeromy committed
Sep 11, 2014 at 02:20 UTC
c41a9717fe56a3f8e92c9694a594271818cc430d
4 files changed
+7
-1
cmd/ipfs/ipfs.go
+1
-1
@@ -4,7 +4,7 @@ import (
4
"errors"
5
"fmt"
6
"os"
7
- "runtime/pprof"
7
+ "runtime"
8
9
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/gonuts/flag"
10
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/commander"
crypto/spipe/handshake.go
+4
@@ -229,6 +229,8 @@ func (s *SecurePipe) handleSecureIn(hashType string, tIV, tCKey, tMKey []byte) {
229
for {
230
data, ok := <-s.insecure.In
231
if !ok {
232
+ u.DOut("Closing incoming proxy.\n")
233
+ close(secureIn)
234
return
235
}
236
@@ -265,6 +267,8 @@ func (s *SecurePipe) handleSecureOut(hashType string, mIV, mCKey, mMKey []byte)
267
for {
268
data, ok := <-s.Out
269
if !ok {
270
+ u.DOut("Closing outgoing proxy.\n")
271
+ close(secureOut)
272
return
273
}
274
fuse/readonly/readonly_unix.go
+1
@@ -168,6 +168,7 @@ func Mount(ipfs *core.IpfsNode, fpath string) error {
168
}
169
time.Sleep(time.Millisecond * 10)
170
}
171
+ ipfs.Swarm.Close()
172
}()
173
174
c, err := fuse.Mount(fpath)
path/path.go
+1
@@ -38,6 +38,7 @@ func (s *Resolver) ResolvePath(fpath string) (*merkledag.Node, error) {
38
// first element in the path is a b58 hash (for now)
39
h, err := mh.FromB58String(parts[0])
40
if err != nil {
41
+ u.DOut("given path element is not a base58 string.\n")
42
return nil, err
43
}
44