log(routing) report boostrap result to user
Brian Tiger Chow committed
Feb 6, 2015 at 11:24 UTC
0a8e5b9948782b37c46c4a27bce24ae5e5fd742d
1 file changed
+8
-1
routing/supernode/proxy/standard.go
+8
-1
@@ -34,10 +34,17 @@ func Standard(h host.Host, remotes []peer.PeerInfo) Proxy {
34
}
35
36
func (px *standard) Bootstrap(ctx context.Context) error {
37
+ var cxns []peer.PeerInfo
38
for _, info := range px.Remotes {
39
if err := px.Host.Connect(ctx, info); err != nil {
39
- return err // TODO
40
+ continue
41
}
42
+ cxns = append(cxns, info)
43
+ }
44
+ if len(cxns) == 0 {
45
+ log.Critical("unable to bootstrap to any supernode routers")
46
+ } else {
47
+ log.Info("bootstrapped to %d supernode routers: %s", len(cxns), cxns)
48
}
49
return nil
50
}