tests/multi_net: Close accepted sockets when tests are done.

gc_sweep_all() cleans up sockets via the finaliser, but tests should
cleanly free resources they use.
pull/4213/head
iabdalkader 2022-01-17 15:15:57 +02:00 zatwierdzone przez Damien George
rodzic 155eb1361e
commit e6ddda29ca
3 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -47,6 +47,7 @@ def instance0():
s2 = ssl.wrap_socket(s2, server_side=True, key=key, cert=cert)
print(s2.read(16))
s2.write(b"server to client")
s2.close()
s.close()

Wyświetl plik

@ -38,6 +38,7 @@ def instance0():
# TODO lwip raises here but apparently it shouldn't
print(s2.recv(10))
print(convert_poll_list(poll.poll(1000)))
s2.close()
s.close()

Wyświetl plik

@ -15,6 +15,7 @@ def instance0():
s2, _ = s.accept()
print(s2.recv(16))
s2.send(b"server to client")
s2.close()
s.close()