func (mb *tcpTransporter) closeIdle() {
	mb.mu.Lock()
	defer mb.mu.Unlock()

	if mb.IdleTimeout <= 0 {
		return
	}
	idle := time.Now().Sub(mb.lastActivity)
	if idle >= mb.IdleTimeout {
		mb.logf("s7: closing connection due to idle timeout: %v", idle)
		mb.close()
	}
}
// closeIdle closes the connection if last activity is passed behind IdleTimeout.
closeIdle closes the connection if last activity is passed behind IdleTimeout.
// closeIdle closes the connection if last activity is passed behind IdleTimeout .
func (mb *tcpTransporter) closeIdle() {
	mb.mu.Lock()
	defer mb.mu.Unlock()
	if mb.IdleTimeout <= 0 {
		return
	}
	idle := time.Now().Sub(mb.lastActivity)
	if idle >= mb.IdleTimeout {
		mb.logf("s7: closing connection due to idle timeout: %v", idle)
		mb.close()
	}
}
func ( mb * tcpTransporter ) closeIdle ( ) { mb . mu . Lock ( ) defer mb . mu . Unlock ( ) if mb . IdleTimeout <= 0 { return } idle := time . Now ( ) . Sub ( mb . lastActivity ) if idle >= mb . IdleTimeout { mb . logf ( " " , idle ) mb . close ( ) } }
closeIdle closes the connection if last activity is passed behind IdleTimeout.
closeIdle closes the connection if last activity is passed behind IdleTimeout .