diff --git a/association.go b/association.go index b9185f70..e82b0dfd 100644 --- a/association.go +++ b/association.go @@ -520,6 +520,8 @@ func (a *Association) readLoop() { } a.lock.Unlock() close(a.acceptCh) + + a.log.Errorf("[%s] readLoop exited %s", a.name, closeErr) close(a.readLoopCloseCh) a.log.Debugf("[%s] association closed", a.name) @@ -528,12 +530,6 @@ 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) - } }() buffer := make([]byte, receiveMTU)