Skip to content

Commit

Permalink
Merge pull request #80 from membraneframework/jb/fix-unexpected-socke…
Browse files Browse the repository at this point in the history
…t-closed-notification

Fix unexpected socket closed notification
  • Loading branch information
balins authored Dec 14, 2023
2 parents f9fc845 + 219023a commit 8dea15a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The package can be installed by adding `membrane_rtmp_plugin` to your list of de
```elixir
def deps do
[
{:membrane_rtmp_plugin, "~> 0.19.2"}
{:membrane_rtmp_plugin, "~> 0.19.3"}
]
end
```
Expand Down
8 changes: 4 additions & 4 deletions lib/membrane_rtmp_plugin/rtmp/source/source.ex
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ defmodule Membrane.RTMP.Source do

@impl true
def handle_info({:socket_closed, _socket}, ctx, state) do
if ctx.pads.output.end_of_stream? do
{[], state}
else
{[notify_parent: :unexpected_socket_closed, end_of_stream: :output], state}
cond do
ctx.pads.output.end_of_stream? -> {[], state}
ctx.pads.output.start_of_stream? -> {[end_of_stream: :output], state}
true -> {[notify_parent: :unexpected_socket_closed, end_of_stream: :output], state}
end
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Membrane.RTMP.Mixfile do
use Mix.Project

@version "0.19.2"
@version "0.19.3"
@github_url "https://github.com/membraneframework/membrane_rtmp_plugin"

def project do
Expand Down

0 comments on commit 8dea15a

Please sign in to comment.