From 05b46f9f3fdc7cd9fe3827ff4341db8be2c5a134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sat, 28 Mar 2020 09:02:47 +0100 Subject: In gun_SUITE shutdown_reason case, don't match in receive Match inside the clause instead. This should make clearer the occasional failure. --- test/gun_SUITE.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl index 04d72af..e61f98f 100644 --- a/test/gun_SUITE.erl +++ b/test/gun_SUITE.erl @@ -443,7 +443,8 @@ shutdown_reason(_) -> {ok, ConnPid} = gun:open("localhost", 12345, #{retry => 0}), Ref = monitor(process, ConnPid), receive - {'DOWN', Ref, process, ConnPid, {shutdown, econnrefused}} -> + {'DOWN', Ref, process, ConnPid, Reason} -> + {shutdown, econnrefused} = Reason, gun:close(ConnPid) end. -- cgit v1.2.3