Skip to content

Commit cd4466c

Browse files
BasharRadyagalnoam
authored andcommitted
issue: 4607536 Fixing TCP hanging CLOSED sockets
Fixing TCP hanging CLOSED sockets. Signed-off-by: Bashar Abdelgafer <[email protected]>
1 parent 0630117 commit cd4466c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/vma/sock/sockinfo_tcp.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,21 +1236,6 @@ void sockinfo_tcp::err_lwip_cb(void *pcb_container, err_t err)
12361236
conn->m_sock_state = TCP_SOCK_INITED;
12371237
}
12381238

1239-
/* In general VMA should avoid calling unregister_timer_event() for the same timer handle twice.
1240-
* It is protected by checking m_timer_handle for NULL value that should be under lock.
1241-
* In order to save locking time a quick check is done first to ensure that indeed the specific
1242-
* timer has not been freed (avoiding the lock/unlock).
1243-
* The 2nd check is to avoid a race of the timer been freed while the lock has been taken.
1244-
*/
1245-
if (conn->m_timer_handle) {
1246-
conn->lock_tcp_con();
1247-
if (conn->m_timer_handle) {
1248-
g_p_event_handler_manager->unregister_timer_event(conn, conn->m_timer_handle);
1249-
conn->m_timer_handle = NULL;
1250-
}
1251-
conn->unlock_tcp_con();
1252-
}
1253-
12541239
conn->do_wakeup();
12551240
}
12561241

0 commit comments

Comments
 (0)