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.
This commit is contained in:
iabdalkader 2022-01-17 15:15:57 +02:00 committed by Damien George
parent 155eb1361e
commit e6ddda29ca
3 changed files with 3 additions and 0 deletions

View File

@ -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()

View File

@ -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()

View File

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