micropython/extmod
Damien George 7ec95c2768 extmod/uasyncio: Get addr and bind server socket before creating task.
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>
2021-06-26 22:30:22 +10:00
..
axtls-include
btstack extmod/btstack: Check that BLE is active before performing operations. 2021-06-23 14:58:39 +10:00
crypto-algorithms all: Fix signed shifts and NULL access errors from -fsanitize=undefined. 2021-06-24 23:01:04 +10:00
lwip-include
nimble extmod/nimble: Remove TODO comment about notify_custom freeing om. 2021-06-17 14:54:04 +10:00
re1.5 extmod/re1.5: Check and report byte overflow errors in _compilecode. 2021-04-06 13:36:42 +10:00
uasyncio extmod/uasyncio: Get addr and bind server socket before creating task. 2021-06-26 22:30:22 +10:00
uzlib
webrepl all: Rename "sys" module to "usys". 2020-09-04 00:10:24 +10:00
extmod.cmake extmod/extmod.cmake: Add support to build btree module with CMake. 2021-04-09 13:33:26 +10:00
extmod.mk extmod: Disable -Wmissing-field-initializers for lfs2. 2020-10-22 11:47:36 +02:00
machine_i2c.c extmod/machine_i2c: Add init protocol method for generic I2C bindings. 2020-11-23 19:45:04 +11:00
machine_i2c.h extmod/machine_i2c: Add init protocol method for generic I2C bindings. 2020-11-23 19:45:04 +11:00
machine_mem.c extmod/machine_mem: Only allow integers in machine.memX subscript. 2020-11-13 11:13:37 +11:00
machine_mem.h
machine_pinbase.c
machine_pinbase.h
machine_pulse.c
machine_pulse.h
machine_signal.c
machine_signal.h
machine_spi.c extmod/machine_spi: Remove "id" arg in SoftSPI constructor. 2020-10-01 12:57:10 +10:00
machine_spi.h ports: Support legacy soft I2C/SPI construction via id=-1 arg. 2020-10-01 12:57:10 +10:00
misc.h
modbluetooth.c extmod/modbluetooth: Free temp arrays in gatts register services. 2021-03-16 13:55:45 +11:00
modbluetooth.h extmod/modbluetooth: Separate enabling of "client" from "central". 2021-02-19 17:53:43 +11:00
modbtree.c
modframebuf.c extmod/modframebuf: Change int to unsigned int in format methods args. 2021-01-29 23:57:10 +11:00
modlwip.c extmod/modlwip: Fix error return for TCP recv when not connected. 2020-08-30 13:20:51 +10:00
modonewire.c extmod/modonewire: Use pin_od_high/pin_od_low instead of pin_write. 2021-01-29 23:57:10 +11:00
moduasyncio.c all: Fix signed shifts and NULL access errors from -fsanitize=undefined. 2021-06-24 23:01:04 +10:00
modubinascii.c extmod/modubinascii: Update code, docs for hexlify now CPython has sep. 2020-12-14 14:35:29 +11:00
moducryptolib.c
moductypes.c extmod/moductypes: Fix size and offset calculation for ARRAY of FLOAT32. 2021-05-06 13:11:33 +10:00
moduhashlib.c extmod/moduhashlib: Put hash obj in final state after digest is called. 2021-05-26 21:44:46 +10:00
moduheapq.c
modujson.c
modurandom.c extmod/modurandom: Support an argument of bits=0 to getrandbits. 2021-05-30 17:05:56 +10:00
modure.c extmod/modure: Allow \\ in re.sub replacements. 2020-09-30 23:18:34 +10:00
moduselect.c extmod: Remove old comments used for auto-doc generation. 2021-05-06 12:27:31 +10:00
modussl_axtls.c extmod/modussl: Fix ussl read/recv/send/write errors when non-blocking. 2021-02-17 11:50:54 +11:00
modussl_mbedtls.c extmod/modussl: Fix ussl read/recv/send/write errors when non-blocking. 2021-02-17 11:50:54 +11:00
modutimeq.c
moduwebsocket.c
moduwebsocket.h
moduzlib.c
modwebrepl.c
mpbthci.c extmod/modbluetooth: Refactor stack/hci/driver/port bindings. 2020-09-08 11:41:31 +10:00
mpbthci.h extmod/modbluetooth: Refactor stack/hci/driver/port bindings. 2020-09-08 11:41:31 +10:00
network_cyw43.c
network_cyw43.h
uos_dupterm.c all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
utime_mphal.c extmod/utime_mphal: Add generic utime.time_ns() function. 2020-10-01 14:20:42 +10:00
utime_mphal.h extmod/utime_mphal: Add generic utime.time_ns() function. 2020-10-01 14:20:42 +10:00
vfs.c extmod/vfs: Check block 0 and 1 when auto-detecting littlefs. 2021-01-29 15:02:55 +11:00
vfs.h
vfs_blockdev.c
vfs_fat.c extmod: Remove old comments used for auto-doc generation. 2021-05-06 12:27:31 +10:00
vfs_fat.h
vfs_fat_diskio.c tools/uncrustify: Enable more opts to remove space between func and '('. 2020-06-19 22:07:32 +10:00
vfs_fat_file.c
vfs_lfs.c py, extmod: Add explicit initializers for default values. 2020-10-22 11:47:36 +02:00
vfs_lfs.h
vfs_lfsx.c extmod/vfs_lfs: Support mounting LFS filesystems in read-only mode. 2020-10-29 11:43:52 +11:00
vfs_lfsx_file.c extmod/vfs_lfs: Add mtime support to littlefs files. 2020-08-25 17:35:19 +10:00
vfs_posix.c extmod/vfs: Support larger integer range in VFS stat time fields. 2020-09-01 12:36:28 +10:00
vfs_posix.h
vfs_posix_file.c extmod/vfs_posix_file: Allow closing an already closed file. 2021-02-11 22:54:41 +11:00
vfs_reader.c extmod/vfs_reader: Fix mp_reader_new_file to open file in "rb" mode. 2020-08-12 23:40:50 +10:00
virtpin.c
virtpin.h