From ae7c7ff5afac3cafcf0ddea955a1dbeb13e4ddf4 Mon Sep 17 00:00:00 2001 From: "Ryan S. Brown" Date: Tue, 8 Dec 2015 14:45:17 -0500 Subject: [PATCH] Explicitly use asyncio protocol for websockets The new default for txaio (dependency of autobahn) requires that you specify how you want websocket connections to be managed (asyncio or twisted) and raises an exception if you don't make a choice. Change-Id: I40695b17916cdd1795778be654a427210192ee2f --- zaqar/transport/websocket/protocol.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zaqar/transport/websocket/protocol.py b/zaqar/transport/websocket/protocol.py index 8fbee7330..5a01cc13f 100644 --- a/zaqar/transport/websocket/protocol.py +++ b/zaqar/transport/websocket/protocol.py @@ -21,6 +21,7 @@ from autobahn.asyncio import websocket from oslo_log import log as logging from oslo_utils import timeutils import pytz +import txaio try: import asyncio @@ -51,6 +52,7 @@ class MessagingProtocol(websocket.WebSocketServerProtocol): } def __init__(self, handler, proto_id, auth_strategy, loop): + txaio.use_asyncio() websocket.WebSocketServerProtocol.__init__(self) self._handler = handler self.proto_id = proto_id