From d19918f5fe5ce3570b96a21c6968add5663a3bcf Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 31 Mar 2018 16:50:59 +0300 Subject: [PATCH] Fix autopsic when error getting central prices --- iguana/exchanges/LP_portfolio.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index 7f0654d504..67247e3921 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -463,19 +463,25 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) if ( (retstr= issue_curlt("https://bittrex.com/api/v1.1/public/getmarketsummaries",LP_HTTP_TIMEOUT*10)) == 0 ) { printf("trex error getting marketsummaries\n"); - sleep(60); - return; + sleep(40); + //return; + } + else + { + nxtkmd = LP_pricesparse(ctx,1,retstr,btcpp); + free(retstr); } - nxtkmd = LP_pricesparse(ctx,1,retstr,btcpp); - free(retstr); if ( (retstr= issue_curlt("https://www.cryptopia.co.nz/api/GetMarkets",LP_HTTP_TIMEOUT*10)) == 0 ) { printf("cryptopia error getting marketsummaries\n"); - sleep(60); - return; + sleep(40); + //return; + } + else + { + LP_pricesparse(ctx,0,retstr,btcpp); + free(retstr); } - LP_pricesparse(ctx,0,retstr,btcpp); - free(retstr); if ( (kmdpp= LP_priceinfofind("KMD")) != 0 ) { for (i=0; i<32; i++)