Skip to content

Commit

Permalink
Finish protocol in IncomingQueue thread (#502)
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollrath authored May 22, 2020
1 parent 9e46e03 commit 0d8de7c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rosbridge_server/src/rosbridge_server/autobahn_websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def run(self):

self.protocol.incoming(msg)

self.protocol.finish()


@implementer(interfaces.IPushProducer)
class OutgoingValve:
Expand Down Expand Up @@ -245,8 +247,9 @@ def onClose(self, was_clean, code, reason):
return # Closed before connection was opened.
cls = self.__class__
cls.clients_connected -= 1
self.protocol.finish()
self.incoming_queue.finish()

if cls.client_manager:
cls.client_manager.remove_client(self.client_id, self.peer)
rospy.loginfo("Client disconnected. %d clients total.", cls.clients_connected)

self.incoming_queue.finish()

0 comments on commit 0d8de7c

Please sign in to comment.