ping: return sme msg
This fixes the broken pinging. (the issue was the cluster level, it's bein set incorrectly (off by one)) Anyway, this works now: [peer: QmfQTbC3LxfpK5WoyHW2WgnAzo6d6GePuq2wHTsJNXM5PS] Sent message type: 'PING' [to = QmNXUeFrV9gxR4aqJddEsfhWZLSJrUsfpUSeRb3R7xvSp9] [QmfQTbC3LxfpK5WoyHW2WgnAzo6d6GePuq2wHTsJNXM5PS] ping QmNXUeFrV9gxR4aqJddEsfhWZLSJrUsfpUSeRb3R7xvSp9 end (err = %!s(<nil>)) cc @whyrusleeping
Juan Batiz-Benet committed
Sep 23, 2014 at 05:21 UTC
10a1a01cf7372a3f88b815ff304ebbff98afcd66
1 file changed
+1
-2
routing/dht/handlers.go
+1
-2
@@ -104,8 +104,7 @@ func (dht *IpfsDHT) handlePutValue(p *peer.Peer, pmes *Message) (*Message, error
104
105
func (dht *IpfsDHT) handlePing(p *peer.Peer, pmes *Message) (*Message, error) {
106
u.DOut("[%s] Responding to ping from [%s]!\n", dht.self.ID.Pretty(), p.ID.Pretty())
107
-
108
- return newMessage(pmes.GetType(), "", int(pmes.GetClusterLevel())), nil
107
+ return pmes, nil
108
}
109
110
func (dht *IpfsDHT) handleFindPeer(p *peer.Peer, pmes *Message) (*Message, error) {