Tell Twisted to keep producing data after connection upgrade

This commit is contained in:
Bas Peschier 2016-08-28 14:39:08 +02:00
parent fca52d4850
commit 65da239aa2

View File

@ -110,6 +110,10 @@ class WebRequest(http.Request):
logger.debug("Connection %s did not get successful WS handshake.", self.reply_channel)
del self.factory.reply_protocols[self.reply_channel]
self.reply_channel = None
# Resume the producer so we keep getting data
self.channel.resumeProducing()
# Boring old HTTP.
else:
# Sanitize and decode headers, potentially extracting root path