Commit a6fd1d82 authored by Antoine Millet's avatar Antoine Millet
Browse files

Added a shutdown_client method on SimpleRpcServer manager to disconnect a...

Added a shutdown_client method on SimpleRpcServer manager to disconnect a client before to calling the disconnection callback.
parent dd00e357
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -41,6 +41,9 @@ class SimpleRpcServer(ConnectionManager):
            connection.shutdown(self._on_disconnect)
        self._listening_sock.close()

    def shutdown_client(self, connection):
        connection.shutdown(callback=self._on_disconnect)

    def all_connections(self):
        return set(self._clients.values())