From fe0a2971922230903e25947bfd525f060bd6d9fb Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Sun, 20 Oct 2013 11:50:49 +0000 Subject: [PATCH] SOCKET_process_end: exit immediately if there are no active sockets. git-svn-id: svn://kolibrios.org@4056 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/network/socket.inc | 6 ++++++ 1 file changed, 6 insertions(+) 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