From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 0FA41430D57 for ; Mon, 28 Oct 2019 18:52:01 +0300 (MSK) From: Ilya Kosarev Date: Mon, 28 Oct 2019 18:51:47 +0300 Message-Id: <026268b0080a542fa413a69dd07b18b8bc514960.1572276894.git.i.kosarev@tarantool.org> In-Reply-To: References: In-Reply-To: References: Subject: [Tarantool-patches] [PATCH v3 2/4] http: remove redundant & incorrect case for curl_request code List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@freelists.org Cc: tarantool-patches@dev.tarantool.org After executing curl request we need to process curl_request code. It might be CURL_WRITE_ERROR. We had special case for it, which assumed diagnostic being set and contained corresponding assert, though it is incorrect. Better way is to handle it as any other non-standard event. Part of #4232 --- src/httpc.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/httpc.c b/src/httpc.c index 146a6f067..22b54d16a 100644 --- a/src/httpc.c +++ b/src/httpc.c @@ -445,16 +445,12 @@ httpc_execute(struct httpc_request *req, double timeout) case CURLE_COULDNT_RESOLVE_PROXY: case CURLE_COULDNT_RESOLVE_HOST: case CURLE_COULDNT_CONNECT: + case CURLE_WRITE_ERROR: /* 595 Connection Problem (AnyEvent non-standard) */ req->status = 595; req->reason = curl_easy_strerror(req->curl_request.code); ++env->stat.failed_requests; break; - case CURLE_WRITE_ERROR: - /* Diag is already set by curl_write_cb() */ - assert(!diag_is_empty(&fiber()->diag)); - ++env->stat.failed_requests; - return -1; case CURLE_OUT_OF_MEMORY: diag_set(OutOfMemory, 0, "curl", "internal"); ++env->stat.failed_requests; -- 2.17.1