aboutsummaryrefslogtreecommitdiffstats
path: root/test/rfc7231_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/rfc7231_SUITE.erl')
-rw-r--r--test/rfc7231_SUITE.erl16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/rfc7231_SUITE.erl b/test/rfc7231_SUITE.erl
index 6ef07fe..ece516b 100644
--- a/test/rfc7231_SUITE.erl
+++ b/test/rfc7231_SUITE.erl
@@ -112,11 +112,19 @@ do_proxy_loop(Transport, ClientSocket, OriginSocket) ->
{OK, _, _} = Transport:messages(),
receive
{OK, ClientSocket, Data} ->
- ok = gen_tcp:send(OriginSocket, Data),
- do_proxy_loop(Transport, ClientSocket, OriginSocket);
+ case gen_tcp:send(OriginSocket, Data) of
+ ok ->
+ do_proxy_loop(Transport, ClientSocket, OriginSocket);
+ {error, _} ->
+ ok
+ end;
{tcp, OriginSocket, Data} ->
- ok = Transport:send(ClientSocket, Data),
- do_proxy_loop(Transport, ClientSocket, OriginSocket);
+ case Transport:send(ClientSocket, Data) of
+ ok ->
+ do_proxy_loop(Transport, ClientSocket, OriginSocket);
+ {error, _} ->
+ ok
+ end;
{tcp_closed, _} ->
ok;
{ssl_closed, _} ->