aboutsummaryrefslogtreecommitdiffstats
path: root/test/gun_test.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/gun_test.erl')
-rw-r--r--test/gun_test.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/gun_test.erl b/test/gun_test.erl
index bb162f4..c6cdd8c 100644
--- a/test/gun_test.erl
+++ b/test/gun_test.erl
@@ -45,7 +45,8 @@ init_origin(Transport, Protocol, Fun) ->
{ok, Pid, Port}.
init_origin(Parent, tcp, Protocol, Fun) ->
- {ok, ListenSocket} = gen_tcp:listen(0, [binary, {active, false}]),
+ %% We setup the socket for both IPv4 and IPv6.
+ {ok, ListenSocket} = gen_tcp:listen(0, [binary, {active, false}, inet6]),
{ok, {_, Port}} = inet:sockname(ListenSocket),
Parent ! {self(), Port},
{ok, ClientSocket} = gen_tcp:accept(ListenSocket, 5000),