func (l *TCP) Close(closeClients mqtt.CloseFunc) {
	if atomic.LoadInt64(&l.end) == 0 {
		atomic.StoreInt64(&l.end, 1)
		closeClients(l.id)
	}

	if l.listen != nil {
		err := l.listen.Close()
		if err != nil {
			return
		}
	}
}
// Close closes the listener and any client connections.
Close closes the listener and any client connections.
// Close closes the listener and any client connections .
func (l *TCP) Close(closeClients mqtt.CloseFunc) {
	if atomic.LoadInt64(&l.end) == 0 {
		atomic.StoreInt64(&l.end, 1)
		closeClients(l.id)
	}
	if l.listen != nil {
		err := l.listen.Close()
		if err != nil {
			return
		}
	}
}
func ( l * TCP ) Close ( closeClients mqtt . CloseFunc ) { if atomic . LoadInt64 ( & l . end ) == 0 { atomic . StoreInt64 ( & l . end , 1 ) closeClients ( l . id ) } if l . listen != nil { err := l . listen . Close ( ) if err != nil { return } } }
Close closes the listener and any client connections.
Close closes the listener and any client connections .