Commit 10a1a01c authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

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
parent eaffabec
......@@ -104,8 +104,7 @@ func (dht *IpfsDHT) handlePutValue(p *peer.Peer, pmes *Message) (*Message, error
func (dht *IpfsDHT) handlePing(p *peer.Peer, pmes *Message) (*Message, error) {
u.DOut("[%s] Responding to ping from [%s]!\n", dht.self.ID.Pretty(), p.ID.Pretty())
return newMessage(pmes.GetType(), "", int(pmes.GetClusterLevel())), nil
return pmes, nil
}
func (dht *IpfsDHT) handleFindPeer(p *peer.Peer, pmes *Message) (*Message, error) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment