From d0d771e5be475bbe55e17906f4d01bd358fedd76 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring Date: Wed, 10 Feb 2021 14:35:49 -0500 Subject: [PATCH] The bug in Autobahn was fixed (https://github.com/crossbario/autobahn-python/pull/1152) in March 2019, i.e. before minimum required 19.5 version of Autobahn which came out in May 2019. --- src/allmydata/web/_autobahn_1151.py | 27 --------------------------- src/allmydata/web/logs.py | 5 ----- 2 files changed, 32 deletions(-) delete mode 100644 src/allmydata/web/_autobahn_1151.py diff --git a/src/allmydata/web/_autobahn_1151.py b/src/allmydata/web/_autobahn_1151.py deleted file mode 100644 index 837656cf2..000000000 --- a/src/allmydata/web/_autobahn_1151.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Implement a work-around for . -""" - - -from __future__ import ( - print_function, - unicode_literals, - absolute_import, - division, -) - - -from autobahn.websocket.protocol import WebSocketProtocol -_originalConnectionLost = WebSocketProtocol._connectionLost - -def _connectionLost(self, reason): - if self.openHandshakeTimeoutCall is not None: - self.openHandshakeTimeoutCall.cancel() - self.openHandshakeTimeoutCall = None - return _originalConnectionLost(self, reason) - -def patch(): - """ - Monkey-patch the proposed fix into place. - """ - WebSocketProtocol._connectionLost = _connectionLost diff --git a/src/allmydata/web/logs.py b/src/allmydata/web/logs.py index 6f15a3ca9..a78e9cd12 100644 --- a/src/allmydata/web/logs.py +++ b/src/allmydata/web/logs.py @@ -21,11 +21,6 @@ from twisted.web.resource import ( Resource, ) -# Hotfix work-around https://github.com/crossbario/autobahn-python/issues/1151 -from . import _autobahn_1151 -_autobahn_1151.patch() -del _autobahn_1151 - class TokenAuthenticatedWebSocketServerProtocol(WebSocketServerProtocol): """