mirror of
https://git.zx2c4.com/wireguard-go
synced 2025-10-13 20:33:54 +08:00
Fixed receive path infinite loop
This commit is contained in:
@@ -98,8 +98,6 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
|
||||
logDebug := device.log.Debug
|
||||
logDebug.Println("Routine, receive incoming, IP version:", IP)
|
||||
|
||||
for {
|
||||
|
||||
// receive datagrams until conn is closed
|
||||
|
||||
buffer := device.GetMessageBuffer()
|
||||
@@ -124,7 +122,7 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
break
|
||||
return
|
||||
}
|
||||
|
||||
if size < MinMessageSize {
|
||||
@@ -212,7 +210,6 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (device *Device) RoutineDecryption() {
|
||||
|
||||
|
Reference in New Issue
Block a user