Skip to content

Commit

Permalink
Add :infinity timeout to gen_mix call
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmi committed Jun 8, 2024
1 parent c72938a commit 46daf80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/gen_mix.ex
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defmodule Strom.GenMix do
end

def call(flow, pid) do
GenServer.call(pid, {:call, flow})
GenServer.call(pid, {:call, flow}, :infinity)
end

def stop(pid) do
Expand Down
2 changes: 1 addition & 1 deletion lib/sink.ex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ defmodule Strom.Sink do
def init(%__MODULE__{} = sink), do: {:ok, %{sink | pid: self()}}

@spec call(__MODULE__.t(), any()) :: event()
def call(%__MODULE__{pid: pid}, data), do: GenServer.call(pid, {:call, data})
def call(%__MODULE__{pid: pid}, data), do: GenServer.call(pid, {:call, data}, :infinity)

@spec call(Strom.flow(), __MODULE__.t()) :: Strom.flow()
def call(flow, %__MODULE__{name: name} = sink) when is_map(flow) do
Expand Down

0 comments on commit 46daf80

Please sign in to comment.