replace all infinities with 10s
This commit is contained in:
parent
ccbe916aeb
commit
63ac6567b6
|
@ -18,23 +18,23 @@ defmodule Floof.PacketSpool do
|
|||
|
||||
## packet is expected to be of type :XferBlob
|
||||
def store(hash, packet) do
|
||||
GenServer.call(__MODULE__, {:store, hash, packet, true}, :infinity)
|
||||
GenServer.call(__MODULE__, {:store, hash, packet, true}, 10000)
|
||||
end
|
||||
|
||||
def store_multi(packets) do
|
||||
GenServer.call(__MODULE__, {:store, packets, true}, :infinity)
|
||||
GenServer.call(__MODULE__, {:store, packets, true}, 10000)
|
||||
end
|
||||
|
||||
def store_new(hash, packet) do
|
||||
GenServer.call(__MODULE__, {:store, hash, packet, false}, :infinity)
|
||||
GenServer.call(__MODULE__, {:store, hash, packet, false}, 10000)
|
||||
end
|
||||
|
||||
def store_new_multi(packets) do
|
||||
GenServer.call(__MODULE__, {:store, packets, false}, :infinity)
|
||||
GenServer.call(__MODULE__, {:store, packets, false}, 10000)
|
||||
end
|
||||
|
||||
def fetch(hash) do
|
||||
GenServer.call(__MODULE__, {:fetch, hash}, :infinity)
|
||||
GenServer.call(__MODULE__, {:fetch, hash}, 10000)
|
||||
end
|
||||
|
||||
def drop(hash) do
|
||||
|
|
|
@ -70,7 +70,7 @@ defmodule Floof.SessionManager do
|
|||
end
|
||||
|
||||
def peek(key) do
|
||||
GenServer.call(__MODULE__, {:peek, key}, :infinity)
|
||||
GenServer.call(__MODULE__, {:peek, key}, 10000)
|
||||
end
|
||||
|
||||
def drop(key, subkeys) do
|
||||
|
@ -154,7 +154,7 @@ defmodule Floof.SessionManager do
|
|||
|
||||
keys ->
|
||||
to_keep = Enum.map(keys, fn [x] -> x end)
|
||||
GenServer.call(Floof.PacketSpool, {:collect_garbage_keep_only, to_keep}, :infinity)
|
||||
GenServer.call(Floof.PacketSpool, {:collect_garbage_keep_only, to_keep}, 10000)
|
||||
Process.send_after(self(), :collect_garbage, 15 * 1000)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue