diff --git a/kernel/trunk/network/socket.inc b/kernel/trunk/network/socket.inc index afdc5bde24..1336e6d85d 100644 --- a/kernel/trunk/network/socket.inc +++ b/kernel/trunk/network/socket.inc @@ -2211,6 +2211,11 @@ SOCKET_check_owner: align 4 SOCKET_process_end: + cmp [net_sockets + SOCKET.NextPtr], 0 ; Are there any active sockets at all? + je .quickret ; nope, exit immediately + +; TODO: run the following code in another thread, to avoid deadlock + DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_process_end: %x\n", edx pusha @@ -2261,6 +2266,7 @@ SOCKET_process_end: call mutex_unlock popa + .quickret: ret