fix nil pointer panic on version strings in ID message

This commit is contained in:
Jeromy 2015-01-29 23:07:32 +00:00
parent 39e858b0e9
commit 704625bceb
1 changed files with 2 additions and 2 deletions

View File

@ -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)
// get protocol versions
pv := *mes.ProtocolVersion
av := *mes.AgentVersion
pv := mes.GetProtocolVersion()
av := mes.GetAgentVersion()
ids.Host.Peerstore().Put(p, "ProtocolVersion", pv)
ids.Host.Peerstore().Put(p, "AgentVersion", av)
}