Commit 704625bc authored by Jeromy's avatar Jeromy
Browse files

fix nil pointer panic on version strings in ID message

parent 39e858b0
...@@ -180,8 +180,8 @@ func (ids *IDService) consumeMessage(mes *pb.Identify, c inet.Conn) { ...@@ -180,8 +180,8 @@ func (ids *IDService) consumeMessage(mes *pb.Identify, c inet.Conn) {
log.Debugf("%s received listen addrs for %s: %s", c.LocalPeer(), c.RemotePeer(), lmaddrs) log.Debugf("%s received listen addrs for %s: %s", c.LocalPeer(), c.RemotePeer(), lmaddrs)
// get protocol versions // get protocol versions
pv := *mes.ProtocolVersion pv := mes.GetProtocolVersion()
av := *mes.AgentVersion av := mes.GetAgentVersion()
ids.Host.Peerstore().Put(p, "ProtocolVersion", pv) ids.Host.Peerstore().Put(p, "ProtocolVersion", pv)
ids.Host.Peerstore().Put(p, "AgentVersion", av) ids.Host.Peerstore().Put(p, "AgentVersion", av)
} }
......
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