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> |
||
---|---|---|
.. | ||
__init__.py | ||
core.py | ||
event.py | ||
funcs.py | ||
lock.py | ||
manifest.py | ||
stream.py | ||
task.py |