Skip to content

Commit cecdc32

Browse files
committed
better match
1 parent 0fdb559 commit cecdc32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ecto/adapters/sqlite3/connection.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defmodule Ecto.Adapters.SQLite3.Connection do
2323
# sleeping an amount of time which is a function of the pool_index
2424
def handle_thundering_herd(opts) do
2525
case Keyword.get(opts, :pool_index) do
26-
idx -> :timer.sleep(idx * @idx_connect_buffer)
26+
idx when is_integer(idx) -> :timer.sleep(idx * @idx_connect_buffer)
2727
nil -> :timer.sleep(:rand.uniform(@rand_connect_buffer))
2828
end
2929

0 commit comments

Comments
 (0)