Skip to content

Commit c7c12c3

Browse files
committed
name anonymous threads
1 parent 15ed248 commit c7c12c3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pyghthouse/connection/wsconnector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def start(self):
4848
self.lock.acquire() # wait for connection to be established
4949
self.__connection_state = ConnectionState.CONNECTING
5050
kwargs = {"sslopt": {"cert_reqs": CERT_NONE}} if self.ignore_ssl_cert else None
51-
Thread(target=self.ws.run_forever, kwargs=kwargs).start()
52-
51+
Thread(target=self.ws.run_forever, name="Websocket Thread", kwargs=kwargs).start()
52+
5353

5454
def _fail(self, ws, err):
5555
self.__connection_state = ConnectionState.FAILED

pyghthouse/ph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def print_warning(msg):
166166
class PHThread(Thread):
167167

168168
def __init__(self, parent):
169-
super().__init__()
169+
super().__init__(name = "PHThread")
170170
self.parent = parent
171171
self._stop_event = Event()
172172

0 commit comments

Comments
 (0)