From 053850fdd69ae497f1087b874ff218f0fefa9dfb Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 10 Mar 2016 17:53:06 -0800 Subject: [PATCH] Use WSGI runserver if no channel backend configured --- channels/management/commands/runserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/management/commands/runserver.py b/channels/management/commands/runserver.py index e470cc0..33185b6 100644 --- a/channels/management/commands/runserver.py +++ b/channels/management/commands/runserver.py @@ -31,7 +31,7 @@ class Command(RunserverCommand): def inner_run(self, *args, **options): # Maybe they want the wsgi one? - if not options.get("use_asgi", True): + if not options.get("use_asgi", True) or DEFAULT_CHANNEL_LAYER not in channel_layers: return RunserverCommand.inner_run(self, *args, **options) # Check a handler is registered for http reqs; if not, add default one self.channel_layer = channel_layers[DEFAULT_CHANNEL_LAYER]