Networking: Fix a runaway recursion problem introduced the previous fixe for shutting down dup'ed sockets.

This commit is contained in:
Gregory Nutt
2017-08-29 12:27:58 -06:00
parent d40ee8e79d
commit 0f7a52bc28
11 changed files with 86 additions and 44 deletions
+3 -3
View File
@@ -439,11 +439,11 @@ static uint16_t tcp_send_interrupt(FAR struct net_driver_s *dev,
else if ((flags & TCP_DISCONN_EVENTS) != 0)
{
/* Report not connected */
ninfo("Lost connection\n");
tcp_lost_connection(sinfo->s_sock, flags);
/* Report the disconnection event to all socket clones */
tcp_lost_connection(sinfo->s_sock, sinfo->s_cb, flags);
sinfo->s_result = -ENOTCONN;
goto end_wait;
}