net: tcp: Do not cancel connect sem from tcp_conn_unref()
Resetting the connect semaphore from tcp_conn_unref() prevents the
ref/unref mechanism from being used freely when needed. Therefore, move
the code responsible for resetting pending connection to
tcp_conn_close() (called only when the connection is being closed on
behalf of the TCP stack, for instance due to RST being received) and to
net_tcp_put() (connection closed on behalf of the application).
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
1 file changed