Skip to content

Commit 7adc836

Browse files
committed
garden
1 parent 5517a0b commit 7adc836

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

waitress/channel.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ def _flush_some(self):
225225
dobreak = False
226226

227227
while True:
228-
229228
outbuf = self.outbufs[0]
230229
outbuflen = len(outbuf)
231230
if outbuflen <= 0:
231+
# self.outbufs[-1] must always be a writable outbuf
232232
if len(self.outbufs) > 1:
233233
toclose = self.outbufs.pop(0)
234234
try:
@@ -298,7 +298,8 @@ def write_soon(self, data):
298298
# the async mainloop might be popping data off outbuf; we can
299299
# block here waiting for it because we're in a task thread
300300
with self.outbuf_lock:
301-
if isinstance(data, ReadOnlyFileBasedBuffer):
301+
if data.__class__ is ReadOnlyFileBasedBuffer:
302+
# they used wsgi.file_wrapper
302303
self.outbufs.append(data)
303304
nextbuf = OverflowableBuffer(self.adj.outbuf_overflow)
304305
self.outbufs.append(nextbuf)

0 commit comments

Comments
 (0)