mirror of
https://github.com/clearml/clearml-session
synced 2025-01-31 02:46:56 +00:00
Fix deprecated call
This commit is contained in:
parent
d1020a5ae0
commit
fa3cd42893
@ -46,8 +46,7 @@ class SingleThreadProxy(object):
|
|||||||
self.server.listen(100)
|
self.server.listen(100)
|
||||||
self.tgthost, self.tgtport = tgthost, tgtport
|
self.tgthost, self.tgtport = tgthost, tgtport
|
||||||
self.buffer_size, self.delay = buffer_size, delay
|
self.buffer_size, self.delay = buffer_size, delay
|
||||||
self._proxy_daemon_thread = threading.Thread(target=self.main_loop)
|
self._proxy_daemon_thread = threading.Thread(target=self.main_loop, daemon=True)
|
||||||
self._proxy_daemon_thread.setDaemon(True)
|
|
||||||
self._proxy_daemon_thread.start()
|
self._proxy_daemon_thread.start()
|
||||||
|
|
||||||
def main_loop(self):
|
def main_loop(self):
|
||||||
|
@ -46,8 +46,7 @@ class TcpProxy(object):
|
|||||||
resource.setrlimit(resource.RLIMIT_NOFILE, (max(4096, soft), hard))
|
resource.setrlimit(resource.RLIMIT_NOFILE, (max(4096, soft), hard))
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
self._proxy_daemon_thread = threading.Thread(target=self.daemon)
|
self._proxy_daemon_thread = threading.Thread(target=self.daemon, daemon=True)
|
||||||
self._proxy_daemon_thread.setDaemon(True)
|
|
||||||
self._proxy_daemon_thread.start()
|
self._proxy_daemon_thread.start()
|
||||||
|
|
||||||
def get_thread(self):
|
def get_thread(self):
|
||||||
@ -349,8 +348,8 @@ class TcpProxy(object):
|
|||||||
self.active_local_sockets[uuid] = {'local_socket': in_socket}
|
self.active_local_sockets[uuid] = {'local_socket': in_socket}
|
||||||
|
|
||||||
# check if thread is waiting
|
# check if thread is waiting
|
||||||
proxy_thread = threading.Thread(target=self.start_proxy_thread, args=(in_socket, uuid, init_data))
|
proxy_thread = threading.Thread(
|
||||||
proxy_thread.setDaemon(True)
|
target=self.start_proxy_thread, args=(in_socket, uuid, init_data), daemon=True)
|
||||||
self.log("Starting proxy thread " + proxy_thread.name)
|
self.log("Starting proxy thread " + proxy_thread.name)
|
||||||
proxy_thread.start()
|
proxy_thread.start()
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
|
Loading…
Reference in New Issue
Block a user