7ec95c2768
Currently when using uasyncio.start_server() the socket configuration is done inside a uasyncio.create_task() background function. If the address and port are already in use however this throws an OSError which cannot be cleanly caught behind the create_task(). This commit moves the getaddrinfo and socket binding to the start_server() function, and only creates the task if that succeeds. This means that any OSError from the initial socket configuration is propagated directly up the call stack, compatible with CPython behaviour. See #7444. Signed-off-by: Damien George <damien@micropython.org> |
||
---|---|---|
.. | ||
README | ||
accept_nonblock.py | ||
accept_nonblock.py.exp | ||
accept_timeout.py | ||
accept_timeout.py.exp | ||
connect_nonblock.py | ||
connect_nonblock.py.exp | ||
connect_nonblock_xfer.py | ||
connect_poll.py | ||
connect_poll.py.exp | ||
ssl_getpeercert.py | ||
ssl_getpeercert.py.exp | ||
uasyncio_start_server.py | ||
uasyncio_start_server.py.exp |
README
This directory contains network tests which require just "peer to peer" network connection between test host and device under test, instead of full Internet connection. Note that setup for these tests and tests themselves are WIP, and may not yet fully correspond to the functional specification above. So far, these tests are not run as part of the main testsuite and need to be run seperately (from the main test/ directory): ./run-tests.py net_hosted/*.py