Skip to content

Commit

Permalink
Fix genserver storage implenentation bad return (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh authored Sep 5, 2024
1 parent adb438d commit 67a116d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions lib/membrane_http_adaptive_stream/storages/genserver_storage.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ defmodule Membrane.HTTPAdaptiveStream.Storages.GenServerStorage do
end

@impl true
def store(parent_id, name, contents, metadata, context, %__MODULE__{
destination: destination,
method: method
}) do
def store(parent_id, name, contents, metadata, context, impl_state) do
params =
Map.merge(context, %{
parent_id: parent_id,
Expand All @@ -52,12 +49,12 @@ defmodule Membrane.HTTPAdaptiveStream.Storages.GenServerStorage do
metadata: metadata
})

method.(destination, {__MODULE__, :store, params})
{impl_state.method.(impl_state.destination, {__MODULE__, :store, params}), impl_state}
end

@impl true
def remove(parent_id, name, context, %__MODULE__{destination: destination, method: method}) do
def remove(parent_id, name, context, impl_state) do
params = Map.merge(context, %{parent_id: parent_id, name: name})
method.(destination, {__MODULE__, :remove, params})
{impl_state.method.(impl_state.destination, {__MODULE__, :store, params}), impl_state}
end
end

0 comments on commit 67a116d

Please sign in to comment.