Kaydet (Commit) a416341b authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

[Patch #649762] Fix for asynchat endless loop

When the null string is used as the terminator, it used to be the same
as None, meaning "collect all the data".  In the current code, however, it
falls into an endless loop; this change reverts to the old behavior.
üst 5b8c69f1
......@@ -100,7 +100,7 @@ class async_chat (asyncore.dispatcher):
while self.ac_in_buffer:
lb = len(self.ac_in_buffer)
terminator = self.get_terminator()
if terminator is None:
if terminator is None or terminator == '':
# no terminator, collect it all
self.collect_incoming_data (self.ac_in_buffer)
self.ac_in_buffer = ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment