Skip to content

Commit

Permalink
fix minor issues
Browse files Browse the repository at this point in the history
  • Loading branch information
uoosef committed Feb 13, 2024
1 parent 52f7b10 commit b6d64e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions device/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ func (peer *Peer) SendKeepalive() {
}

if i < numPackets-1 {
// Wait for a random duration between 200 and 500 milliseconds
time.Sleep(time.Duration(randomInt(200, 500)) * time.Millisecond)
// Wait for a random duration between 20 and 250 milliseconds
time.Sleep(time.Duration(randomInt(20, 250)) * time.Millisecond)
}
}
elem := peer.device.NewOutboundElement()
Expand Down Expand Up @@ -238,8 +238,8 @@ func (peer *Peer) SendHandshakeInitiation(isRetry bool) error {
}

if i < numPackets-1 {
// Wait for a random duration between 200 and 500 milliseconds
time.Sleep(time.Duration(randomInt(200, 500)) * time.Millisecond)
// Wait for a random duration between 20 and 250 milliseconds
time.Sleep(time.Duration(randomInt(20, 250)) * time.Millisecond)
}
}

Expand Down
5 changes: 4 additions & 1 deletion wiresocks/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,11 @@ func ParseInterface(cfg *ini.File, device *DeviceConfig) error {
return err
}
device.MTU = value
} else {
if dc == 0 {
device.MTU = value + 100
device.MTU = 1420
} else {
device.MTU = 1300
}
}

Expand Down

0 comments on commit b6d64e1

Please sign in to comment.