Skip to content

Commit c0a2d32

Browse files
authored
Release v0.1.5 (#14)
* Bump to v0.1.5 * Fix credo warnings
1 parent bf293d5 commit c0a2d32

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The package exposes a server and a client module to interact with SRT streams.
1313
```elixir
1414
def deps do
1515
[
16-
{:ex_libsrt, "~> 0.1.4"}
16+
{:ex_libsrt, "~> 0.1.5"}
1717
]
1818
end
1919
```

mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defmodule ExLibSRT.MixProject do
22
use Mix.Project
33

4-
@version "0.1.4"
4+
@version "0.1.5"
55
@github_url "https://github.com/membraneframework/ex_libsrt"
66

77
def project do

test/ex_libsrt/client_test.exs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,22 +139,22 @@ defmodule ExLibSRT.ClientTest do
139139

140140
defp stop_client_safe(client) when is_pid(client) do
141141
if Process.alive?(client) do
142-
_ = Client.stop(client)
142+
:ok = Client.stop(client)
143143
end
144144
end
145145

146146
defp stop_client_safe(_client), do: :ok
147147

148148
defp stop_proxy_safe(proxy) do
149149
case :erlang.port_info(proxy, :os_pid) do
150-
{:os_pid, _os_pid} -> _ = Transmit.stop_proxy(proxy)
151-
_ -> :ok
150+
{:os_pid, _os_pid} -> Transmit.stop_proxy(proxy)
151+
_other -> :ok
152152
end
153153
end
154154

155155
defp close_stream_safe(socket) do
156156
if is_port(socket) and :erlang.port_info(socket) != nil do
157-
_ = Transmit.close_stream(socket)
157+
:ok = Transmit.close_stream(socket)
158158
end
159159
end
160160
end

test/ex_libsrt/server_test.exs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ defmodule ExLibSRT.ServerTest do
1717
ctx.srt_port,
1818
stream_id
1919
)
20+
2021
on_exit(fn -> stop_proxy_safe(proxy) end)
2122

2223
assert_receive {:srt_server_connect_request, address, ^stream_id}, 2_000
@@ -47,6 +48,7 @@ defmodule ExLibSRT.ServerTest do
4748
test "receive data over connection", ctx do
4849
proxy =
4950
Transmit.start_streaming_proxy(ctx.udp_port, ctx.srt_port, "data_stream_id")
51+
5052
on_exit(fn -> stop_proxy_safe(proxy) end)
5153

5254
stream = Transmit.start_stream(ctx.udp_port)
@@ -111,6 +113,7 @@ defmodule ExLibSRT.ServerTest do
111113
ctx.srt_port,
112114
"closing_stream_id"
113115
)
116+
114117
on_exit(fn -> stop_proxy_safe(proxy) end)
115118

116119
assert_receive {:srt_server_connect_request, _address, _stream_id}, 2_000
@@ -130,6 +133,7 @@ defmodule ExLibSRT.ServerTest do
130133
ctx.udp_port,
131134
ctx.srt_port
132135
)
136+
133137
on_exit(fn -> stop_proxy_safe(proxy) end)
134138

135139
assert_receive {:srt_server_connect_request, _address, _stream_id}, 2_000
@@ -149,6 +153,7 @@ defmodule ExLibSRT.ServerTest do
149153
ctx.udp_port,
150154
ctx.srt_port
151155
)
156+
152157
on_exit(fn -> stop_proxy_safe(proxy) end)
153158

154159
assert_receive {:srt_server_connect_request, _address, _stream_id}, 2_000
@@ -212,6 +217,7 @@ defmodule ExLibSRT.ServerTest do
212217

213218
proxy =
214219
Transmit.start_streaming_proxy(ctx.udp_port, ctx.srt_port, "data_stream_id")
220+
215221
on_exit(fn -> stop_proxy_safe(proxy) end)
216222

217223
stream = Transmit.start_stream(ctx.udp_port)
@@ -292,14 +298,14 @@ defmodule ExLibSRT.ServerTest do
292298

293299
defp stop_proxy_safe(proxy) do
294300
case :erlang.port_info(proxy, :os_pid) do
295-
{:os_pid, _os_pid} -> _ = Transmit.stop_proxy(proxy)
296-
_ -> :ok
301+
{:os_pid, _os_pid} -> Transmit.stop_proxy(proxy)
302+
_other -> :ok
297303
end
298304
end
299305

300306
defp close_stream_safe(socket) do
301307
if is_port(socket) and :erlang.port_info(socket) != nil do
302-
_ = Transmit.close_stream(socket)
308+
:ok = Transmit.close_stream(socket)
303309
end
304310
end
305311
end

0 commit comments

Comments
 (0)