diff --git a/association.go b/association.go index b9185f70..ce3725ec 100644 --- a/association.go +++ b/association.go @@ -507,8 +507,6 @@ func (a *Association) closeAllTimers() { func (a *Association) readLoop() { var closeErr error - - a.log.Debugf("[%s] readLoop entered", a.name) defer func() { // also stop writeLoop, otherwise writeLoop can be leaked // if connection is lost when there is no writing packet. @@ -528,14 +526,9 @@ func (a *Association) readLoop() { a.log.Debugf("[%s] stats nT3Timeouts : %d", a.name, a.stats.getNumT3Timeouts()) a.log.Debugf("[%s] stats nAckTimeouts: %d", a.name, a.stats.getNumAckTimeouts()) a.log.Debugf("[%s] stats nFastRetrans: %d", a.name, a.stats.getNumFastRetrans()) - - if errors.Is(closeErr, net.ErrClosed) || errors.Is(closeErr, io.EOF) { - a.log.Debugf("[%s] readLoop exited %s", a.name, closeErr) - } else { - a.log.Errorf("[%s] readLoop exited %s", a.name, closeErr) - } }() + a.log.Debugf("[%s] readLoop entered", a.name) buffer := make([]byte, receiveMTU) for { @@ -556,6 +549,8 @@ func (a *Association) readLoop() { break } } + + a.log.Debugf("[%s] readLoop exited %s", a.name, closeErr) } func (a *Association) writeLoop() {