From d7d9ea20f40527b6617714a8c0dc57e82b4831c1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 20 Jun 2017 21:14:23 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 49aed9d2d..bdcbe3e28 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -206,8 +206,8 @@ void LP_psockloop(void *_ptr) } // else printf("num pfds.%d retval.%d\n",n,retval); } } - portable_mutex_unlock(&LP_psockmutex); free(pfds); + printf("sendsock.%d Numpsocks.%d\n",sendsock,Numpsocks); if ( sendsock < 0 ) { for (i=nonz=0; ipublicsock); if ( ptr->sendsock >= 0 ) nn_close(ptr->sendsock); - portable_mutex_lock(&LP_psockmutex); + //portable_mutex_lock(&LP_psockmutex); if ( Numpsocks > 1 ) { PSOCKS[i] = PSOCKS[--Numpsocks]; memset(&PSOCKS[Numpsocks],0,sizeof(*ptr)); } else Numpsocks = 0; - portable_mutex_unlock(&LP_psockmutex); + //portable_mutex_unlock(&LP_psockmutex); break; } else if ( now > ptr->lastping+PSOCK_KEEPALIVE/2 ) @@ -254,6 +254,7 @@ void LP_psockloop(void *_ptr) } } } + portable_mutex_unlock(&LP_psockmutex); if ( nonz == 0 && i == Numpsocks ) usleep(100000); }