Merge pull request #7119 from jepler/picow-reuseaddr
Enable, use SOF_REUSEADDR
This commit is contained in:
commit
ca25016b52
@ -852,6 +852,8 @@ bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t *socket,
|
||||
mp_raise_OSError(EHOSTUNREACH);
|
||||
}
|
||||
|
||||
ip_set_option(socket->pcb.ip, SOF_REUSEADDR);
|
||||
|
||||
err_t err = ERR_ARG;
|
||||
switch (socket->type) {
|
||||
case MOD_NETWORK_SOCK_STREAM: {
|
||||
|
@ -37,6 +37,7 @@ typedef struct _lwip_socket_obj_t {
|
||||
mp_obj_base_t base;
|
||||
|
||||
volatile union {
|
||||
struct tcp_pcb *ip;
|
||||
struct tcp_pcb *tcp;
|
||||
struct udp_pcb *udp;
|
||||
struct raw_pcb *raw;
|
||||
|
@ -52,6 +52,7 @@
|
||||
#define LWIP_NETIF_TX_SINGLE_PBUF 1
|
||||
#define DHCP_DOES_ARP_CHECK 0
|
||||
#define LWIP_DHCP_DOES_ACD_CHECK 0
|
||||
#define SO_REUSE 1
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define LWIP_DEBUG 1
|
||||
|
Loading…
Reference in New Issue
Block a user