From 6673159e13e0b2fe7a5c8593a6e1637b2e3826dc Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 6 Jul 2017 18:21:59 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_network.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/iguana/exchanges/LP_network.c b/iguana/exchanges/LP_network.c index 0950cbf0d..c349f3b86 100644 --- a/iguana/exchanges/LP_network.c +++ b/iguana/exchanges/LP_network.c @@ -232,11 +232,20 @@ void LP_psockloop(void *_ptr) // printouts seem to be needed for forwarding to w else if ( now > ptr->lastping+PSOCK_KEEPALIVE/2 && ptr->errors < 3 ) { ptr->lastping = now; - sendsock = ptr->sendsock; - sprintf(keepalive,"{\"method\":\"keepalive\",\"endpoint\":\"%s\"}",ptr->sendaddr); - size = (int32_t)strlen(keepalive) + 1; - buf = keepalive; - printf("send keepalive.(%s)\n",keepalive); + if ( 0 ) + { + sendsock = ptr->sendsock; + sprintf(keepalive,"{\"method\":\"keepalive\",\"endpoint\":\"%s\"}",ptr->sendaddr); + size = (int32_t)strlen(keepalive) + 1; + buf = keepalive; + printf("send keepalive.(%s)\n",keepalive); + } + else + { + nn_freemsg(buf); + buf = 0; + size = 0; + } break; } }