Skip to content

Commit

Permalink
Use update_in instead of get_and_update_in
Browse files Browse the repository at this point in the history
  • Loading branch information
varsill committed Apr 5, 2024
1 parent c165237 commit 2debc8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/agora/agora_dispatcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ defmodule Membrane.Agora.Dispatcher do
end

state =
get_and_update_in(state, [:output_pads, user_id, :is_connected], fn false ->
update_in(state, [:output_pads, user_id, :is_connected], fn false ->
true
end)

Expand All @@ -83,7 +83,7 @@ defmodule Membrane.Agora.Dispatcher do
defp buffer_up(state, buffer) do
user_id = buffer.metadata.id

get_and_update_in(state, [:output_pads, user_id, :buffered], fn buffered ->
update_in(state, [:output_pads, user_id, :buffered], fn buffered ->
[buffer | buffered]
end)
end
Expand Down

0 comments on commit 2debc8d

Please sign in to comment.