Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Schedule writer for remaining buffer in writelines
If all the data in the buffer can't be written immediately
schedule a writer to handle the remaining data.
  • Loading branch information
alisaifee committed Apr 12, 2023
commit ce03f17a778d91f83684466d471714a51f9b0bde
3 changes: 3 additions & 0 deletions Lib/asyncio/selector_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,9 @@ def writelines(self, list_of_data):
return
self._buffer.extend([memoryview(data) for data in list_of_data])
self._write_ready()
# If the entire buffer couldn't be written, register a write handler
if self._buffer:
self._loop._add_writer(self._sock_fd, self._write_ready)

def can_write_eof(self):
return True
Expand Down