Skip to content

Commit

Permalink
fix(link): mtu check
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Aug 3, 2024
1 parent 7e14ca5 commit bafeb14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gold/link/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (m *Me) AddPeer(cfg *PeerConfig) (l *Link) {
if ok {
return
}
if cfg.MTU == 0 || (m.mtu != 0 && cfg.MTU > m.mtu) {
if m.mtu == 0 {
panic("invalid mtu for peer " + cfg.PeerIP)
}
l = &Link{
Expand Down

0 comments on commit bafeb14

Please sign in to comment.