summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-01-18 15:51:22 -0500
committerChris McDonough <chrism@plope.com>2012-01-18 15:51:22 -0500
commit7adc8369e4ac52e6ac37c5faf69a669099dfcca4 (patch)
tree41610ffb93a33cfccb7cc4d4905dd0f7c59cb6e7
parent5517a0b0f8464b9ac2f110375aefe9ef7b8431b8 (diff)
downloadwaitress-7adc8369e4ac52e6ac37c5faf69a669099dfcca4.tar.gz
garden
-rw-r--r--waitress/channel.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/waitress/channel.py b/waitress/channel.py
index 5535853..aea5f52 100644
--- a/waitress/channel.py
+++ b/waitress/channel.py
@@ -225,10 +225,10 @@ class HTTPChannel(logging_dispatcher, object):
dobreak = False
while True:
-
outbuf = self.outbufs[0]
outbuflen = len(outbuf)
if outbuflen <= 0:
+ # self.outbufs[-1] must always be a writable outbuf
if len(self.outbufs) > 1:
toclose = self.outbufs.pop(0)
try:
@@ -298,7 +298,8 @@ class HTTPChannel(logging_dispatcher, object):
# the async mainloop might be popping data off outbuf; we can
# block here waiting for it because we're in a task thread
with self.outbuf_lock:
- if isinstance(data, ReadOnlyFileBasedBuffer):
+ if data.__class__ is ReadOnlyFileBasedBuffer:
+ # they used wsgi.file_wrapper
self.outbufs.append(data)
nextbuf = OverflowableBuffer(self.adj.outbuf_overflow)
self.outbufs.append(nextbuf)