Fixed receive path infinite loop
This commit is contained in:
parent
cd369cde45
commit
cb09125dc4
@ -98,8 +98,6 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
|
|||||||
logDebug := device.log.Debug
|
logDebug := device.log.Debug
|
||||||
logDebug.Println("Routine, receive incoming, IP version:", IP)
|
logDebug.Println("Routine, receive incoming, IP version:", IP)
|
||||||
|
|
||||||
for {
|
|
||||||
|
|
||||||
// receive datagrams until conn is closed
|
// receive datagrams until conn is closed
|
||||||
|
|
||||||
buffer := device.GetMessageBuffer()
|
buffer := device.GetMessageBuffer()
|
||||||
@ -124,7 +122,7 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
break
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if size < MinMessageSize {
|
if size < MinMessageSize {
|
||||||
@ -211,7 +209,6 @@ func (device *Device) RoutineReceiveIncoming(IP int, bind Bind) {
|
|||||||
buffer = device.GetMessageBuffer()
|
buffer = device.GetMessageBuffer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (device *Device) RoutineDecryption() {
|
func (device *Device) RoutineDecryption() {
|
||||||
|
Loading…
Reference in New Issue
Block a user