Only use IPv4 127.0.0.1 for tests

Fix #331
This commit is contained in:
Michał Trojnara
2023-12-21 11:33:48 +01:00
parent 98b004edda
commit 4d08fbb2c1
3 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ def main() -> None:
try:
with open(PORT_LOG, 'r') as file:
port = file.readline()
conn = http.client.HTTPConnection('localhost', port)
conn = http.client.HTTPConnection('127.0.0.1', port)
conn.request('POST', '/kill_server')
response = conn.getresponse()
print("HTTP status code:", response.getcode(), end=', ')