tracker/udp: Panic on read errors if ConnClient not closed
There's nothing exposed to handle this error currently, and if it occurs, it's better not to fail in silence. I'm currently debugging a situation where ConnClients stop working, this would be a condition we'd want to know about.
This commit is contained in:
parent
615669ecf8
commit
aaec4dbd80
|
@ -35,6 +35,9 @@ func (cc *ConnClient) reader() {
|
|||
// TODO: Do bad things to the dispatcher, and incoming calls to the client if we have a
|
||||
// read error.
|
||||
cc.readErr = err
|
||||
if !cc.closed {
|
||||
panic(err)
|
||||
}
|
||||
break
|
||||
}
|
||||
err = cc.d.Dispatch(b[:n], addr)
|
||||
|
|
Loading…
Reference in New Issue