mirror of https://github.com/python/cpython
Revert 3270 patch: self._address is in pretty widespread use, need to revisit
This commit is contained in:
parent
2bad6577a1
commit
9949d6ed4b
|
@ -215,14 +215,16 @@ class SocketListener(object):
|
|||
self._socket = socket.socket(getattr(socket, family))
|
||||
self._socket.bind(address)
|
||||
self._socket.listen(backlog)
|
||||
address = self._socket.getsockname()
|
||||
if type(address) is tuple:
|
||||
address = (socket.getfqdn(address[0]),) + address[1:]
|
||||
self._address = address
|
||||
self._family = family
|
||||
self._last_accepted = None
|
||||
|
||||
sub_debug('listener bound to address %r', self._address)
|
||||
|
||||
if family == 'AF_UNIX':
|
||||
self._unlink = Finalize(
|
||||
self, os.unlink, args=(self._address,), exitpriority=0
|
||||
self, os.unlink, args=(address,), exitpriority=0
|
||||
)
|
||||
else:
|
||||
self._unlink = None
|
||||
|
|
Loading…
Reference in New Issue