From ff72c7b40085d8f6af68a12d463eb77f81feec57 Mon Sep 17 00:00:00 2001 From: "feliks.pobiedzinski@swmansion.com" Date: Tue, 23 Jan 2024 16:59:05 +0100 Subject: [PATCH] Revert "Fix timer running late (#685)" This reverts commit 168f57e12bf3280cda82b1116796151d4b1cb486. --- lib/membrane/core/element.ex | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/membrane/core/element.ex b/lib/membrane/core/element.ex index 8bd3d91c7..5901c9048 100644 --- a/lib/membrane/core/element.ex +++ b/lib/membrane/core/element.ex @@ -256,20 +256,7 @@ defmodule Membrane.Core.Element do end defp do_handle_info(Message.new(:timer_tick, timer_id), state) do - # Guarding the `TimerController.handle_tick/2` invocation is - # required since there might be a case in which `handle_tick` - # callback's implementation returns demand action. - # In this scenario, without this guard, there would a possibility that - # the `handle_buffer` would be called immediately, returning - # some action that would affect the timer and the original state - # of the timer, set with actions returned from `handle_tick`, - # would be overwritten with that action. - # - # For more information see: https://github.com/membraneframework/membrane_core/issues/670 - state = %{state | supplying_demand?: true} state = TimerController.handle_tick(timer_id, state) - state = %{state | supplying_demand?: false} - state = Membrane.Core.Element.DemandHandler.handle_delayed_demands(state) {:noreply, state} end