mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Bug #1531963: Make SocketServer.TCPServer's server_address always be equal to calling getsockname() on the server's socket.
Will backport.
This commit is contained in:
parent
dbead56cb6
commit
22c42ba88c
3 changed files with 5 additions and 0 deletions
|
@ -339,6 +339,7 @@ class TCPServer(BaseServer):
|
|||
if self.allow_reuse_address:
|
||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
self.socket.bind(self.server_address)
|
||||
self.server_address = self.socket.getsockname()
|
||||
|
||||
def server_activate(self):
|
||||
"""Called by constructor to activate the server.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue