Handle TLS errors in receivequeuethread
- well at least EBADF, it seems to happen sometimes
This commit is contained in:
parent
4f19c37fdc
commit
aa059d6f2f
|
@ -1,4 +1,6 @@
|
||||||
|
import errno
|
||||||
import Queue
|
import Queue
|
||||||
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
@ -43,4 +45,9 @@ class ReceiveQueueThread(threading.Thread, StoppableThread):
|
||||||
# AttributeError = state isn't implemented
|
# AttributeError = state isn't implemented
|
||||||
except (KeyError, AttributeError):
|
except (KeyError, AttributeError):
|
||||||
pass
|
pass
|
||||||
|
except socket.error as err:
|
||||||
|
if err.errno == errno.EBADF:
|
||||||
|
BMConnectionPool().getConnectionByAddr(dest).set_state("close", 0)
|
||||||
|
else:
|
||||||
|
logger.error("Socket error: %s", str(err))
|
||||||
receiveDataQueue.task_done()
|
receiveDataQueue.task_done()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user