Skip to content

Commit 2743068

Browse files
yf13dpgeorge
authored andcommitted
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 micropython#17623. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
1 parent 8f8f853 commit 2743068

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/extmod/select_poll_udp.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@
2929
if hasattr(select, "select"):
3030
r, w, e = select.select([s], [], [], 0)
3131
assert not r and not w and not e
32+
33+
s.close()

tests/extmod/socket_udp_nonblock.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919
s.recv(1)
2020
except OSError as er:
2121
print("EAGAIN:", er.errno == errno.EAGAIN)
22+
23+
s.close()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy