mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
The Grande 'sendall()' patch, copied from release21-maint. Fixes #516715.
Replaces calls to socket.send() (which isn't guaranteed to send all data) with the new socket.sendall() method.
This commit is contained in:
parent
976ade691c
commit
e12454f44a
9 changed files with 15 additions and 24 deletions
|
@ -185,7 +185,7 @@ class _fileobject:
|
|||
|
||||
def flush(self):
|
||||
if self._wbuf:
|
||||
self._sock.send(self._wbuf)
|
||||
self._sock.sendall(self._wbuf)
|
||||
self._wbuf = ""
|
||||
|
||||
def fileno(self):
|
||||
|
@ -201,7 +201,7 @@ class _fileobject:
|
|||
self.flush()
|
||||
|
||||
def writelines(self, list):
|
||||
filter(self._sock.send, list)
|
||||
filter(self._sock.sendall, list)
|
||||
self.flush()
|
||||
|
||||
def read(self, n=-1):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue