From 562deaf6eeb89ea378fe24828fcdb81794199449 Mon Sep 17 00:00:00 2001 From: Daniel Hobley Date: Fri, 17 Jun 2016 10:35:54 +0200 Subject: [PATCH] Fixed realtime script on autobahn 0.11.0 --- autobahn/autobahnServer.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/autobahn/autobahnServer.py b/autobahn/autobahnServer.py index df4a91441d3..b222149b5fe 100644 --- a/autobahn/autobahnServer.py +++ b/autobahn/autobahnServer.py @@ -90,6 +90,8 @@ def pollFailure(self): class BroadcastServerProtocol(WebSocketServerProtocol): def __init__(self): self.peerstr = "" + WebSocketServerProtocol.__init__(self) + def onOpen(self): self.factory.register(self) @@ -110,7 +112,7 @@ class BroadcastServerFactory(WebSocketServerFactory): """ def __init__(self, url, debug=False, debugCodePaths=False): - WebSocketServerFactory.__init__(self, url, debug=debug, debugCodePaths=debugCodePaths) + WebSocketServerFactory.__init__(self, url) self.urlCacheDict = {} self.clients = [] self.clients_urls = {} @@ -334,11 +336,10 @@ def createDeamon(): debugCodePaths=debug) factory.protocol = BroadcastServerProtocol - factory.setProtocolOptions(allowHixie76=True) + factory.setProtocolOptions() listenWS(factory) webdir = File(".") sweb = Site(webdir) - reactor.listenTCP(8080, factory) - reactor.run() - logging.info("Starting autobahn server on port {0}".format(PORT)) \ No newline at end of file + reactor.run() + logging.info("Starting autobahn server on port {0}".format(PORT))