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:
Yanfeng Liu
2025-07-11 08:24:20 +08:00
committed by Damien George
parent 8f8f853982
commit 274306860b
2 changed files with 4 additions and 0 deletions

View File

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

View File

@@ -19,3 +19,5 @@ try:
s.recv(1)
except OSError as er:
print("EAGAIN:", er.errno == errno.EAGAIN)
s.close()