[magneticod] detect UDP socket closure reliably
This commit is contained in:
parent
738e5c1e0f
commit
061aff8ddc
@ -94,7 +94,8 @@ func (t *Transport) readMessages() {
|
||||
zap.L().Warn("READ CONGESTION!", zap.Error(err))
|
||||
t.onCongestion()
|
||||
} else if err != nil {
|
||||
zap.L().Warn("Could NOT read an UDP packet!", zap.Error(err))
|
||||
// Socket is probably closed
|
||||
break
|
||||
}
|
||||
|
||||
if n == 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user