nickva commented on a change in pull request #1177: Avoid unconditional retries 
in replicator's http client
URL: https://github.com/apache/couchdb/pull/1177#discussion_r169827307
 
 

 ##########
 File path: src/couch_replicator/src/couch_replicator_httpc.erl
 ##########
 @@ -139,12 +139,12 @@ process_response({error, sel_conn_closed}, Worker, 
HttpDb, Params, _Cb) ->
 %% next request.
 process_response({error, connection_closing}, Worker, HttpDb, Params, _Cb) ->
     stop_and_release_worker(HttpDb#httpdb.httpc_pool, Worker),
-    throw({retry, HttpDb, Params});
+    maybe_retry({error, connection_closing}, Worker, HttpDb, Params);
 
-process_response({error, req_timedout}, _Worker, HttpDb, Params, _Cb) ->
+process_response({error, req_timedout}, Worker, HttpDb, Params, _Cb) ->
     % ibrowse worker terminated because remote peer closed the socket
     % -> not an error
-    throw({retry, HttpDb, Params});
+    maybe_retry({error, req_timedout}, Worker, HttpDb, Params);
 
 Review comment:
   Oh totally, let's remove it. Good call.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to