mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-05 07:50:24 +08:00
fix(link): mtu check
This commit is contained in:
@@ -33,7 +33,7 @@ func (m *Me) AddPeer(cfg *PeerConfig) (l *Link) {
|
|||||||
if ok {
|
if ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if cfg.MTU == 0 || (m.mtu != 0 && cfg.MTU > m.mtu) {
|
if m.mtu == 0 {
|
||||||
panic("invalid mtu for peer " + cfg.PeerIP)
|
panic("invalid mtu for peer " + cfg.PeerIP)
|
||||||
}
|
}
|
||||||
l = &Link{
|
l = &Link{
|
||||||
|
|||||||
Reference in New Issue
Block a user