From 704625bceb80df91161b842c8d684f5d330227b7 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Thu, 29 Jan 2015 23:07:32 +0000 Subject: [PATCH] fix nil pointer panic on version strings in ID message --- protocol/identify/id.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/identify/id.go b/protocol/identify/id.go index 293334a7..107c2538 100644 --- a/protocol/identify/id.go +++ b/protocol/identify/id.go @@ -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) }