p2p listener should only log an error if not shutting down
This commit is contained in:
1 parent
0e607c1939
commit
1dfe344c4d
1 file changed
+5
-1
@@ -198,7 +198,11 @@ func (s *server) listener(l net.Listener) {
|
|||||||
for atomic.LoadInt32(&s.shutdown) == 0 {
|
for atomic.LoadInt32(&s.shutdown) == 0 {
|
||||||
conn, err := l.Accept()
|
conn, err := l.Accept()
|
||||||
if err != nil {
|
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
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user