diff options
Diffstat (limited to 'lib/kernel/src/local_udp.erl')
-rw-r--r-- | lib/kernel/src/local_udp.erl | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/kernel/src/local_udp.erl b/lib/kernel/src/local_udp.erl index ebb4d2b33f..481a8c4910 100644 --- a/lib/kernel/src/local_udp.erl +++ b/lib/kernel/src/local_udp.erl @@ -59,7 +59,14 @@ open(0, Opts) -> when tuple_size(BAddr) =:= 2, element(1, BAddr) =:= ?FAMILY; BAddr =:= any -> inet:open( - Fd, BAddr, 0, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE); + Fd, + case BAddr of + any -> + undefined; + _ -> + BAddr + end, + 0, SockOpts, ?PROTO, ?FAMILY, ?TYPE, ?MODULE); {ok, _} -> exit(badarg) end. |