mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -66,7 +66,7 @@ def send_selector(selector, host, port = 0):
|
|||
port = int(port)
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.connect((host, port))
|
||||
s.send(selector + CRLF)
|
||||
s.sendall(selector + CRLF)
|
||||
s.shutdown(1)
|
||||
return s.makefile('rb')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue