From 7bc4fbfa5de892bcf0752857b2ed4a4f10aec219 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Mon, 22 Sep 2014 19:22:04 -0700 Subject: [PATCH] turn logging on by default, also make Provide not fail when no peers connected --- cmd/ipfs/ipfs.go | 2 +- cmd/ipfs/mount_unix.go | 1 - routing/dht/routing.go | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/ipfs/ipfs.go b/cmd/ipfs/ipfs.go index 431b5263a..5e895175b 100644 --- a/cmd/ipfs/ipfs.go +++ b/cmd/ipfs/ipfs.go @@ -62,7 +62,7 @@ func ipfsCmd(c *commander.Command, args []string) error { } func main() { - // u.Debug = true + u.Debug = true err := CmdIpfs.Dispatch(os.Args[1:]) if err != nil { if len(err.Error()) > 0 { diff --git a/cmd/ipfs/mount_unix.go b/cmd/ipfs/mount_unix.go index 0b35bfeaf..d2fe28a16 100644 --- a/cmd/ipfs/mount_unix.go +++ b/cmd/ipfs/mount_unix.go @@ -30,7 +30,6 @@ var cmdIpfsMount = &commander.Command{ } func mountCmd(c *commander.Command, inp []string) error { - u.Debug = false if len(inp) < 1 || len(inp[0]) == 0 { u.POut(c.Long) return nil diff --git a/routing/dht/routing.go b/routing/dht/routing.go index 164e6ee3a..a057ca828 100644 --- a/routing/dht/routing.go +++ b/routing/dht/routing.go @@ -194,7 +194,7 @@ func (dht *IpfsDHT) FindProviders(ctx context.Context, key u.Key) ([]*peer.Peer, u.DOut("Find providers for: '%s'\n", key) p := dht.routingTables[0].NearestPeer(kb.ConvertKey(key)) if p == nil { - return nil, kb.ErrLookupFailure + return nil, nil } for level := 0; level < len(dht.routingTables); {