Bug #978833: Revert r50844, as it broke _socketobject.dup.
Will backport.
This commit is contained in:
parent
2f401d7186
commit
0af338859b
|
@ -948,8 +948,8 @@ class HTTPConnection:
|
|||
self.__state = _CS_IDLE
|
||||
|
||||
if response.will_close:
|
||||
# Pass the socket to the response
|
||||
self.sock = None
|
||||
# this effectively passes the connection to the response
|
||||
self.close()
|
||||
else:
|
||||
# remember this, so we can tell when it is complete
|
||||
self.__response = response
|
||||
|
|
|
@ -139,8 +139,6 @@ class _closedsocket(object):
|
|||
__slots__ = []
|
||||
def _dummy(*args):
|
||||
raise error(EBADF, 'Bad file descriptor')
|
||||
def close(self):
|
||||
pass
|
||||
# All _delegate_methods must also be initialized here.
|
||||
send = recv = recv_into = sendto = recvfrom = recvfrom_into = _dummy
|
||||
__getattr__ = _dummy
|
||||
|
@ -159,7 +157,6 @@ class _socketobject(object):
|
|||
setattr(self, method, getattr(_sock, method))
|
||||
|
||||
def close(self):
|
||||
self._sock.close()
|
||||
self._sock = _closedsocket()
|
||||
dummy = self._sock._dummy
|
||||
for method in _delegate_methods:
|
||||
|
|
Loading…
Reference in New Issue