mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-24 06:47:44 +01:00
p2p listener should only log an error if not shutting down
This commit is contained in:
parent
0e607c1939
commit
1dfe344c4d
1 changed files with 5 additions and 1 deletions
|
@ -198,7 +198,11 @@ func (s *server) listener(l net.Listener) {
|
|||
for atomic.LoadInt32(&s.shutdown) == 0 {
|
||||
conn, err := l.Accept()
|
||||
if err != nil {
|
||||
// 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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue