mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-06 05:26:38 +02:00
p2p listener should only log an error if not shutting down
This commit is contained in:
@ -198,7 +198,11 @@ func (s *server) listener(l net.Listener) {
|
||||
for atomic.LoadInt32(&s.shutdown) == 0 {
|
||||
conn, err := l.Accept()
|
||||
if err != nil {
|
||||
srvrLog.Errorf("Can't accept connection: %v", err)
|
||||
// Only log the error message if we aren't currently
|
||||
// shutting down.
|
||||
if atomic.LoadInt32(&s.shutdown) == 0 {
|
||||
srvrLog.Errorf("Can't accept connection: %v", err)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user