mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 13:01:10 +02:00
tests/extmod: Close UDP sockets at end of test.
This adds call to release UDP port in a timely manner, so they can be reused in subsequent tests. Otherwise, one could face issue like #17623. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
committed by
Damien George
parent
8f8f853982
commit
274306860b
@@ -29,3 +29,5 @@ print(poll.poll(0)[0][1] == select.POLLOUT)
|
||||
if hasattr(select, "select"):
|
||||
r, w, e = select.select([s], [], [], 0)
|
||||
assert not r and not w and not e
|
||||
|
||||
s.close()
|
||||
|
@@ -19,3 +19,5 @@ try:
|
||||
s.recv(1)
|
||||
except OSError as er:
|
||||
print("EAGAIN:", er.errno == errno.EAGAIN)
|
||||
|
||||
s.close()
|
||||
|
Reference in New Issue
Block a user