Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: context: Fix use of k_delayed_work_cancel with SYN backlog
This patch fixes a regression which the original patch introducing this code (improving concurrent connection handling) had on *sequential* connection handling. Without this patch, with the default CONFIG_NET_TCP_BACKLOG_SIZE of 1, after each connection request, there was 1s (ACK timeout) "dead time" during which new connection wasn't ptocessed. This is because k_delayed_work_remaining_get() was checked the wrong way. But there's no need to use k_delayed_work_remaining_get() at all, instead just call k_delayed_work_cancel() and dispatch on its return code. Note that there's still a problem of synchronizing access to the global array tcp_backlog, as worker (which modifies it) may preempt packet handling code (which also modifies it). Signed-off-by: Paul Sokolovsky <[email protected]>
- Loading branch information