Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(runtime) Avoid windows reserved port (#7722)

Carlos Freundf2b4772ac2cd
diff --git a/openhands/runtime/utils/system.py b/openhands/runtime/utils/system.py
index f7c70982dc..171a6575c2 100644
--- a/openhands/runtime/utils/system.py
+++ b/openhands/runtime/utils/system.py
@@ -6,7 +6,7 @@ import time
def check_port_available(port: int) -> bool:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
- sock.bind(('localhost', port))
+ sock.bind(('0.0.0.0', port))
return True
except OSError:
time.sleep(0.1) # Short delay to further reduce chance of collisions