summaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Lib/socket.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/Lib/socket.py')
-rw-r--r--contrib/tools/python3/Lib/socket.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/tools/python3/Lib/socket.py b/contrib/tools/python3/Lib/socket.py
index 91782b30ae8..35d87eff34d 100644
--- a/contrib/tools/python3/Lib/socket.py
+++ b/contrib/tools/python3/Lib/socket.py
@@ -715,16 +715,15 @@ class SocketIO(io.RawIOBase):
self._checkReadable()
if self._timeout_occurred:
raise OSError("cannot read from timed out object")
- while True:
- try:
- return self._sock.recv_into(b)
- except timeout:
- self._timeout_occurred = True
- raise
- except error as e:
- if e.errno in _blocking_errnos:
- return None
- raise
+ try:
+ return self._sock.recv_into(b)
+ except timeout:
+ self._timeout_occurred = True
+ raise
+ except error as e:
+ if e.errno in _blocking_errnos:
+ return None
+ raise
def write(self, b):
"""Write the given bytes or bytearray object *b* to the socket