mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-22 02:47:48 +08:00
cleanup changes from PR
This commit is contained in:
parent
001b7ab714
commit
cf478af971
@ -268,10 +268,11 @@ func (n *IpfsNode) startOnlineServices(ctx context.Context, routingOption Routin
|
||||
if do != nil {
|
||||
service, err := do(n.PeerHost)
|
||||
if err != nil {
|
||||
return err
|
||||
log.Error("mdns error: ", err)
|
||||
} else {
|
||||
service.RegisterNotifee(n)
|
||||
n.Discovery = service
|
||||
}
|
||||
service.RegisterNotifee(n)
|
||||
n.Discovery = service
|
||||
}
|
||||
|
||||
return n.Bootstrap(DefaultBootstrapConfig)
|
||||
|
||||
@ -2,13 +2,10 @@ package discovery
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
golog "log"
|
||||
"net"
|
||||
//"strconv"
|
||||
//"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@ -75,8 +72,6 @@ func NewMdnsService(peerhost host.Host, interval time.Duration) (Service, error)
|
||||
port = addr.Port
|
||||
}
|
||||
|
||||
fmt.Println("using port: ", port)
|
||||
|
||||
myid := peerhost.ID().Pretty()
|
||||
|
||||
info := []string{myid}
|
||||
@ -135,7 +130,6 @@ func (m *mdnsService) pollForEntries() {
|
||||
}
|
||||
|
||||
func (m *mdnsService) handleEntry(e *mdns.ServiceEntry) {
|
||||
fmt.Println("handling entry!")
|
||||
mpeer, err := peer.IDB58Decode(e.Info)
|
||||
if err != nil {
|
||||
log.Warning("Error parsing peer ID from mdns entry: ", err)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user