Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jul 15, 2024
1 parent 6dbf87c commit b431f7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/random-port/pool.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ def acquire(total = 1, timeout: 4)
start = Time.now
loop do
if Time.now > start + timeout
raise Timeout, "Can't find a place in the pool of #{@limit} ports \
for #{total} port(s), in #{format('%.02f', Time.now - start)}s"
raise \
Timeout,
"Can't find a place in the pool of #{@limit} ports " \
"for #{total} port(s), in #{format('%.02f', Time.now - start)}s"
end
opts = safe do
next if @ports.count + total > @limit
Expand Down

0 comments on commit b431f7a

Please sign in to comment.