Skip to content

Commit 8dea15a

Browse files
authored
Merge pull request #80 from membraneframework/jb/fix-unexpected-socket-closed-notification
Fix unexpected socket closed notification
2 parents f9fc845 + 219023a commit 8dea15a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtmp_plugin` to your list of de
1414
```elixir
1515
def deps do
1616
[
17-
{:membrane_rtmp_plugin, "~> 0.19.2"}
17+
{:membrane_rtmp_plugin, "~> 0.19.3"}
1818
]
1919
end
2020
```

lib/membrane_rtmp_plugin/rtmp/source/source.ex

+4-4
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ defmodule Membrane.RTMP.Source do
222222

223223
@impl true
224224
def handle_info({:socket_closed, _socket}, ctx, state) do
225-
if ctx.pads.output.end_of_stream? do
226-
{[], state}
227-
else
228-
{[notify_parent: :unexpected_socket_closed, end_of_stream: :output], state}
225+
cond do
226+
ctx.pads.output.end_of_stream? -> {[], state}
227+
ctx.pads.output.start_of_stream? -> {[end_of_stream: :output], state}
228+
true -> {[notify_parent: :unexpected_socket_closed, end_of_stream: :output], state}
229229
end
230230
end
231231

mix.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule Membrane.RTMP.Mixfile do
22
use Mix.Project
33

4-
@version "0.19.2"
4+
@version "0.19.3"
55
@github_url "https://github.com/membraneframework/membrane_rtmp_plugin"
66

77
def project do

0 commit comments

Comments
 (0)