Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
704625bc
Commit
704625bc
authored
Jan 29, 2015
by
Jeromy
Browse files
fix nil pointer panic on version strings in ID message
parent
39e858b0
Changes
1
Show whitespace changes
Inline
Side-by-side
protocol/identify/id.go
View file @
704625bc
...
...
@@ -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
.
Get
ProtocolVersion
()
av
:=
mes
.
Get
AgentVersion
()
ids
.
Host
.
Peerstore
()
.
Put
(
p
,
"ProtocolVersion"
,
pv
)
ids
.
Host
.
Peerstore
()
.
Put
(
p
,
"AgentVersion"
,
av
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment