diff --git a/txsockjs/websockets.py b/txsockjs/websockets.py index f982401..58c3b7e 100644 --- a/txsockjs/websockets.py +++ b/txsockjs/websockets.py @@ -37,6 +37,7 @@ from zope.interface import implementer, Interface +from twisted.internet import interfaces from twisted.protocols.policies import ProtocolWrapper, WrappingFactory from twisted.python import log from twisted.python.constants import NamedConstant, Names @@ -546,6 +547,12 @@ def render(self, request): # transport's lifecycle. transport, request.transport = request.transport, None + # Twisted 16.4.1 calls pauseProducing() once the request is received. + # Resume the producer now. + producer = interfaces.IPushProducer(transport, None) + if producer is not None: + producer.resumeProducing() + # Connect the transport to our factory, and make things go. We need to # do some stupid stuff here; see #3204, which could fix it. if request.isSecure():