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:
parent
155eb1361e
commit
e6ddda29ca
@ -47,6 +47,7 @@ def instance0():
|
|||||||
s2 = ssl.wrap_socket(s2, server_side=True, key=key, cert=cert)
|
s2 = ssl.wrap_socket(s2, server_side=True, key=key, cert=cert)
|
||||||
print(s2.read(16))
|
print(s2.read(16))
|
||||||
s2.write(b"server to client")
|
s2.write(b"server to client")
|
||||||
|
s2.close()
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -38,6 +38,7 @@ def instance0():
|
|||||||
# TODO lwip raises here but apparently it shouldn't
|
# TODO lwip raises here but apparently it shouldn't
|
||||||
print(s2.recv(10))
|
print(s2.recv(10))
|
||||||
print(convert_poll_list(poll.poll(1000)))
|
print(convert_poll_list(poll.poll(1000)))
|
||||||
|
s2.close()
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ def instance0():
|
|||||||
s2, _ = s.accept()
|
s2, _ = s.accept()
|
||||||
print(s2.recv(16))
|
print(s2.recv(16))
|
||||||
s2.send(b"server to client")
|
s2.send(b"server to client")
|
||||||
|
s2.close()
|
||||||
s.close()
|
s.close()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user