Skip to content

Commit

Permalink
handle ECONNREFUSED
Browse files Browse the repository at this point in the history
  • Loading branch information
Ableytner committed Mar 13, 2024
1 parent 3a8657b commit 1334f44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mcserverwrapper/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def assert_port_is_free(port: int = 25565, strict=True) -> bool:
return False
# linux error?
except socket.error as e:
if e.errno == errno.EADDRINUSE:
if e.errno == errno.EADDRINUSE or e.errno == errno.ECONNREFUSED:
if strict:
pytest.skip(reason=f"Port {port} is in use")
else:
Expand Down

0 comments on commit 1334f44

Please sign in to comment.