mirror of
https://github.com/django/daphne.git
synced 2024-11-24 08:53:43 +03:00
Go back to not passing just the server into protocols
This commit is contained in:
parent
ccd8d18da8
commit
011ec23333
|
@ -155,10 +155,10 @@ class HTTPFactory(http.HTTPFactory):
|
|||
|
||||
protocol = HTTPProtocol
|
||||
|
||||
def __init__(self, server):
|
||||
def __init__(self, channel_layer, action_logger=None):
|
||||
http.HTTPFactory.__init__(self)
|
||||
self.channel_layer = server.channel_layer
|
||||
self.action_logger = server.action_logger
|
||||
self.channel_layer = channel_layer
|
||||
self.action_logger = action_logger
|
||||
# We track all sub-protocols for response channel mapping
|
||||
self.reply_protocols = {}
|
||||
# Make a factory for WebSocket protocols
|
||||
|
|
|
@ -14,7 +14,7 @@ class Server(object):
|
|||
self.action_logger = action_logger
|
||||
|
||||
def run(self):
|
||||
self.factory = HTTPFactory(self)
|
||||
self.factory = HTTPFactory(self.channel_layer, self.action_logger)
|
||||
reactor.listenTCP(self.port, self.factory, interface=self.host)
|
||||
reactor.callInThread(self.backend_reader)
|
||||
reactor.run(installSignalHandlers=self.signal_handlers)
|
||||
|
|
Loading…
Reference in New Issue
Block a user