diff --git a/owrx/connection.py b/owrx/connection.py index b012f51..c0b7861 100644 --- a/owrx/connection.py +++ b/owrx/connection.py @@ -492,17 +492,17 @@ class HandshakeMessageHandler(Handler): client = None if "type" in handshake: if handshake["type"] == "receiver": - client = OpenWebRxReceiverClient(conn) + client = OpenWebRxReceiverClient elif handshake["type"] == "map": - client = MapConnection(conn) + client = MapConnection else: logger.warning("invalid connection type: %s", handshake["type"]) if client is not None: - logger.debug("handshake complete, handing off to %s", type(client).__name__) + logger.debug("handshake complete, handing off to %s", client.__name__) # hand off all further communication to the correspondig connection conn.send("CLIENT DE SERVER server=openwebrx version={version}".format(version=openwebrx_version)) - conn.setMessageHandler(client) + conn.setMessageHandler(client(conn)) else: logger.warning('invalid handshake received') else: