Skip to content

Commit

Permalink
Fix capabilities check
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Sep 29, 2022
1 parent d0beb18 commit 957f517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (r *Router) Connect(conn net.Conn, options ...ConnectionOption) (types.Swit
conn.Close()
return 0, fmt.Errorf("mismatched node version")
}
if theirCapabilities := binary.BigEndian.Uint32(handshake[4:8]); theirCapabilities&ourCapabilities != ourCapabilities {
if theirCapabilities := binary.BigEndian.Uint32(handshake[4:8]); theirCapabilities != ourCapabilities {
conn.Close()
return 0, fmt.Errorf("mismatched node capabilities")
}
Expand Down

0 comments on commit 957f517

Please sign in to comment.