httpc icon indicating copy to clipboard operation
httpc copied to clipboard

Disable retry mechanism

Open MikolajMarkiel opened this issue 1 year ago • 2 comments

Is there a way to disable retry mechanism? Right now I see we can reduce connection attempt to a minimum 1 so we can't avoid retrying connection it at least once. If I try to set connection attempts to 0 then there is build error on BUILD_BUG_ON macro.

MikolajMarkiel avatar Jun 18 '24 16:06 MikolajMarkiel

I've really not tried it, it might work if you remove the BUILD_BUG_ON but from experience you really do want retries over certain networks (such as cellular networks) otherwise you will have problems.

howerj avatar Jul 04 '24 18:07 howerj

I set BUILD_BUG_ON to 0. It was working fine until any network failure happens. Anyway it is for a purpose of handing retry mechanism on user own if there is a need. In my opinion it shouldn't be advised but should be able.

MikolajMarkiel avatar Jul 04 '24 18:07 MikolajMarkiel