Skip to content
Commit 6b00b537 authored by Robert Lubos's avatar Robert Lubos Committed by Carles Cufí
Browse files

net: tcp: Fix deadlock with tcp_conn_close()



While improving thread safety of the TCP stack I've introduced a
possible deadlock scenario, when calling tcp_conn_close() in tcp_in().
This function shall not be called with connection mutex locked, as it
calls registered recv callback internally, which could lead to deadlock
between TCP/socket mutexes.

This commit moves the tcp_conn_close() back where it was originally
called. I've verified that the thread safety is still solid with the
test apps used originally.

Signed-off-by: default avatarRobert Lubos <robert.lubos@nordicsemi.no>
parent e268a6ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment