interface: do not use daemon threads
This commit is contained in:
@@ -60,7 +60,6 @@ class TcpConnection(threading.Thread, util.PrintError):
|
|||||||
|
|
||||||
def __init__(self, server, queue, config_path):
|
def __init__(self, server, queue, config_path):
|
||||||
threading.Thread.__init__(self)
|
threading.Thread.__init__(self)
|
||||||
self.daemon = True
|
|
||||||
self.config_path = config_path
|
self.config_path = config_path
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
self.server = server
|
self.server = server
|
||||||
@@ -105,6 +104,7 @@ class TcpConnection(threading.Thread, util.PrintError):
|
|||||||
for res in l:
|
for res in l:
|
||||||
try:
|
try:
|
||||||
s = socket.socket(res[0], socket.SOCK_STREAM)
|
s = socket.socket(res[0], socket.SOCK_STREAM)
|
||||||
|
s.settimeout(10)
|
||||||
s.connect(res[4])
|
s.connect(res[4])
|
||||||
s.settimeout(2)
|
s.settimeout(2)
|
||||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user