Browse code

- more reliable tcp shutdown: force unlock the tcp lock in case some terminated process did hold it

Andrei Pelinescu-Onciul authored on 02/11/2006 23:35:32
Showing 1 changed files
... ...
@@ -1786,6 +1786,11 @@ error:
1786 1786
 void destroy_tcp()
1787 1787
 {
1788 1788
 		if (tcpconn_id_hash){
1789
+			if (tcpconn_lock)
1790
+				TCPCONN_UNLOCK; /* hack: force-unlock the tcp lock in case
1791
+								   some process was terminated while holding 
1792
+								   it; this will allow an almost gracious 
1793
+								   shutdown */
1789 1794
 			tcpconn_timeout(1); /* force close/expire for all active tcpconns*/
1790 1795
 			shm_free(tcpconn_id_hash);
1791 1796
 			tcpconn_id_hash=0;