diff --git a/lib/nats/io/jetstream/pull_subscription.rb b/lib/nats/io/jetstream/pull_subscription.rb index eb327ec..ef50eb7 100644 --- a/lib/nats/io/jetstream/pull_subscription.rb +++ b/lib/nats/io/jetstream/pull_subscription.rb @@ -55,7 +55,7 @@ def fetch(batch=1, params={}) end t = MonotonicTime.now - timeout = params[:timeout] ||= 5 + timeout = params[:timeout] ? Float(params[:timeout]) : 5.0 expires = (timeout * 1_000_000_000) - 100_000 next_req = { batch: batch