diff options
Diffstat (limited to 'lib/kernel/src/local_tcp.erl')
-rw-r--r-- | lib/kernel/src/local_tcp.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/kernel/src/local_tcp.erl b/lib/kernel/src/local_tcp.erl index 64085ec42e..e3c67dfbb7 100644 --- a/lib/kernel/src/local_tcp.erl +++ b/lib/kernel/src/local_tcp.erl @@ -107,8 +107,14 @@ do_connect(Addr = {?FAMILY, _}, 0, Opts, Time) -> when tuple_size(BAddr) =:= 2, element(1, BAddr) =:= ?FAMILY; BAddr =:= any -> case inet:open( - Fd, BAddr, 0, SockOpts, - ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of + Fd, + case BAddr of + any -> + undefined; + _ -> + BAddr + end, + 0, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE) of {ok, S} -> case prim_inet:connect(S, Addr, 0, Time) of ok -> {ok,S}; |