Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions subsys/net/lib/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ static void zsock_flush_queue(struct net_context *ctx)
while ((p = k_fifo_get(&ctx->recv_q, K_NO_WAIT)) != NULL) {
if (is_listen) {
NET_DBG("discarding ctx %p", p);

/* Note that we must release all the packets we
* might have received to the accepted socket.
*/
zsock_flush_queue(p);
net_context_put(p);
} else {
NET_DBG("discarding pkt %p", p);
Expand Down
Loading