From 49a693afd31b02bb5570cd701972199a275d08bc Mon Sep 17 00:00:00 2001 From: Anders Jensen Date: Mon, 16 Jul 2018 18:31:44 +0200 Subject: [PATCH] removed deferToThread for ASGI instance constructor --- daphne/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daphne/server.py b/daphne/server.py index 63d34db..305bf59 100755 --- a/daphne/server.py +++ b/daphne/server.py @@ -183,7 +183,7 @@ class Server(object): assert "application_instance" not in self.connections[protocol] # Make an instance of the application input_queue = asyncio.Queue() - application_instance = yield deferToThread(self.application, scope=scope) + application_instance = self.application(scope=scope) # Run it, and stash the future for later checking if protocol not in self.connections: return None