mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Fix misassigned default serving server address in adapter client
This commit is contained in:
parent
f53cba25b3
commit
3ef28441ed
2 changed files with 3 additions and 3 deletions
|
|
@ -473,12 +473,12 @@ class Client(components.Component):
|
|||
'"processId" and "subProcessId" are mutually exclusive'
|
||||
)
|
||||
|
||||
localhost = sockets.get_default_localhost()
|
||||
if listen != ():
|
||||
if servers.is_serving():
|
||||
raise request.isnt_valid(
|
||||
'Multiple concurrent "listen" sessions are not supported'
|
||||
)
|
||||
localhost = sockets.get_default_localhost()
|
||||
host = listen("host", localhost)
|
||||
port = listen("port", int)
|
||||
adapter.access_token = None
|
||||
|
|
@ -486,7 +486,7 @@ class Client(components.Component):
|
|||
host, port = servers.serve(host, port)
|
||||
else:
|
||||
if not servers.is_serving():
|
||||
servers.serve(host)
|
||||
servers.serve(localhost)
|
||||
host, port = servers.listener.getsockname()[:2]
|
||||
|
||||
# There are four distinct possibilities here.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ def can_bind_ipv4_localhost():
|
|||
sock.bind(("127.0.0.1", 0))
|
||||
sock.close()
|
||||
return True
|
||||
except (socket.error, OSError):
|
||||
except (socket.error, OSError, AttributeError):
|
||||
return False
|
||||
|
||||
def can_bind_ipv6_localhost():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue