Commit be8c879a authored by Denis Bilenko's avatar Denis Bilenko

revert 1003:714c59c30efe: socket.dup() is not supposed to inherit the timeout

parent b3b4e30a
......@@ -312,12 +312,13 @@ class socket(object):
def dup(self):
"""dup() -> socket object
Return a new socket object connected to the same system resource."""
new_sock = socket(_sock=self._sock)
new_sock.timeout = self.timeout
return new_sock
Return a new socket object connected to the same system resource.
Note, that the new socket does not inherit the timeout."""
return socket(_sock=self._sock)
def makefile(self, mode='r', bufsize=-1):
# note that this does not inherit timeout either (intentionally, because that's
# how the standard socket behaves)
return _fileobject(self.dup(), mode, bufsize)
def recv(self, *args):
......
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