Skip to content

Commit

Permalink
Fixed an issue where exponential_sleep would choke on a nil. For some…
Browse files Browse the repository at this point in the history
… reason, @runtime might be nil and you cannot += a nil.  It wasn't being used anywhere else anyway.
  • Loading branch information
PatrickTulskie committed Dec 17, 2009
1 parent e856240 commit 7ee82f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cash/lock.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def release_lock(key)
end

def exponential_sleep(count)
@runtime += Benchmark::measure { sleep((2**count) / 2.0) }
sleep((2**count) / 2.0)
end

private
Expand Down

0 comments on commit 7ee82f6

Please sign in to comment.