VFS LwIP: delay accepted connections

Ref #2335
This commit is contained in:
Ehmry - 2018-08-09 11:47:00 +02:00 committed by Christian Helmuth
parent 14a338af40
commit 67d88526b9
2 changed files with 5 additions and 4 deletions

View File

@ -36,6 +36,7 @@ extern "C" {
#define LWIP_NETIF_LOOPBACK 1 /* Looping back to same address? */
#define LWIP_STATS 0 /* disable stating */
#define LWIP_TCP_TIMESTAMPS 1
#define TCP_LISTEN_BACKLOG 1
#define TCP_MSS 1460
#define TCP_WND (32 * TCP_MSS)
#define TCP_SND_BUF (32 * TCP_MSS)

View File

@ -1040,10 +1040,6 @@ class Lwip::Tcp_socket_dir final :
/* tcp_sent(_pcb, tcp_sent_callback); */
tcp_err(_pcb, tcp_err_callback);
if (pcb) {
tcp_backlog_accepted(_pcb);
}
}
~Tcp_socket_dir()
@ -1069,6 +1065,8 @@ class Lwip::Tcp_socket_dir final :
Pcb_pending *elem = new (alloc) Pcb_pending(newpcb);
_pcb_pending.insert(elem);
tcp_backlog_delayed(newpcb);
tcp_arg(newpcb, elem);
tcp_recv(newpcb, tcp_delayed_recv_callback);
@ -1250,6 +1248,8 @@ class Lwip::Tcp_socket_dir final :
handle.socket = &new_dir;
new_dir.handles.insert(&handle);
tcp_backlog_accepted(pp->pcb);
_pcb_pending.remove(pp);
destroy(alloc, pp);