Skip to content

Commit 292776b

Browse files
committed
format fixed
1 parent 98cf44b commit 292776b

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

lib/thrift/binary/framed/client.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ defmodule Thrift.Binary.Framed.Client do
172172
:ok = transport.close(sock)
173173

174174
case info do
175-
{:reconnect, _} = reconnect ->
175+
{:reconnect, _} ->
176176
{:connect, info, %{s | sock: nil}}
177177

178178
{:close, from} ->

test/thrift/binary/framed/server_test.exs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -182,17 +182,23 @@ defmodule Servers.Binary.Framed.IntegrationTest do
182182
thrift_test "client can reconnect when connection closed by server", ctx do
183183
{:ok, sock} = :gen_tcp.listen(0, [:binary, packet: 4, active: false])
184184
{:ok, port} = :inet.port(sock)
185-
first_conn = Task.async(fn ->
186-
{:ok, conn} = :gen_tcp.accept(sock)
187-
:ok = :gen_tcp.close(conn)
188-
end)
185+
186+
first_conn =
187+
Task.async(fn ->
188+
{:ok, conn} = :gen_tcp.accept(sock)
189+
:ok = :gen_tcp.close(conn)
190+
end)
191+
189192
name = String.to_atom("#{ctx.client_name}_1")
190193
{:ok, client} = Client.start_link("localhost", port, name: name, reconnect: true)
191-
second_conn = Task.async(fn ->
192-
{:ok, conn} = :gen_tcp.accept(sock)
193-
{:ok, _} = :gen_tcp.recv(conn, 0)
194-
:ok = :gen_tcp.send(conn, @ping_reply)
195-
end)
194+
195+
second_conn =
196+
Task.async(fn ->
197+
{:ok, conn} = :gen_tcp.accept(sock)
198+
{:ok, _} = :gen_tcp.recv(conn, 0)
199+
:ok = :gen_tcp.send(conn, @ping_reply)
200+
end)
201+
196202
assert {:ok, true} == Client.ping(client)
197203
Task.await(first_conn)
198204
Task.await(second_conn)

0 commit comments

Comments
 (0)