davisp commented on a change in pull request #2924:
URL: https://github.com/apache/couchdb/pull/2924#discussion_r434817958
##########
File path: src/couch_jobs/src/couch_jobs.erl
##########
@@ -385,10 +385,13 @@ wait_any(Subs, State, Timeout0, ResendQ) when
end.
-limit_timeout(Timeout) when is_integer(Timeout), Timeout < 16#FFFFFFFF ->
+limit_timeout(_Timeout, true) ->
+ infinity;
+
+limit_timeout(Timeout, false) when is_integer(Timeout), Timeout < 16#FFFFFFFF
->
Timeout;
-limit_timeout(_Timeout) ->
+limit_timeout(_Timeout, false) ->
Review comment:
From your description:
> When no_schedule option is used, time scheduling parameter is set to 0
always, and so in that case, we have to special-case the limit to return
infinity.
I read that as that we should return `infinity` when `Timeout == 0`. This
catchall case wouldn't do that because the previous clause catches zero (and
all negative integers).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]