Skip to content

Commit

Permalink
Assign names to heartbeat and receiver threads
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Jan 24, 2016
1 parent 4058051 commit 2cc5b78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions stomp/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def on_connected(self, headers, body):
self.running = True
if self.heartbeat_thread is None:
self.heartbeat_thread = utils.default_create_thread(self.__heartbeat_loop)
self.heartbeat_thread.name = "StompHeartbeat%s" % getattr(self.heartbeat_thread, "name", "Thread")

def on_disconnected(self):
self.running = False
Expand Down
3 changes: 2 additions & 1 deletion stomp/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def start(self):
"""
self.running = True
self.attempt_connection()
self.create_thread_fc(self.__receiver_loop)
receiver_thread = self.create_thread_fc(self.__receiver_loop)
receiver_thread.name = "StompReceiver%s" % getattr(receiver_thread, "name", "Thread")
self.notify('connecting')

def stop(self):
Expand Down

0 comments on commit 2cc5b78

Please sign in to comment.