Commit e00f376f authored by AlexStocks's avatar AlexStocks

exit when udp session got error

parent be3d7889
......@@ -700,12 +700,9 @@ func (s *session) handleUDPPackage() error {
if nerr, ok = err.(net.Error); ok && nerr.Timeout() {
continue
}
if bufLen == 0 {
continue
}
if err != nil {
log.Warn("%s, [session.handleUDPPackage] = len{%d}, error{%+v}", s.sessionToken(), bufLen, err)
continue
log.Error("%s, [session.handleUDPPackage] = len{%d}, error{%+v}", s.sessionToken(), bufLen, err)
break
}
pkg, pkgLen, err = s.reader.Read(s, buf[:bufLen])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment