Skip to content

Commit

Permalink
fix: protocol name
Browse files Browse the repository at this point in the history
  • Loading branch information
egonspace committed Aug 2, 2024
1 parent 853e4e8 commit 0bc582c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ outer:
}
if proto.Match(cap) {
// If an old protocol version matched, revert it
if old := result[cap.Name]; old != nil {
if old := result[proto.Name]; old != nil {
offset -= old.Length
}
// Assign the new match
result[cap.Name] = &protoRW{Protocol: proto, offset: offset, in: make(chan Msg), w: rw}
result[proto.Name] = &protoRW{Protocol: proto, offset: offset, in: make(chan Msg), w: rw}
offset += proto.Length

continue outer
Expand Down

0 comments on commit 0bc582c

Please sign in to comment.