diff options
author | Raimo Niskanen <[email protected]> | 2016-06-08 09:56:04 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2016-06-08 14:45:32 +0200 |
commit | f429adba7e7a862b9949821b40aa3cba12455b3e (patch) | |
tree | eab986313b34e0acb67caafae26f3e3e985b65e1 /lib/kernel/src/local_tcp.erl | |
parent | 2c9dba638a8bda92e3db2d5c07e6ba251330c7ca (diff) | |
download | otp-f429adba7e7a862b9949821b40aa3cba12455b3e.tar.gz otp-f429adba7e7a862b9949821b40aa3cba12455b3e.tar.bz2 otp-f429adba7e7a862b9949821b40aa3cba12455b3e.zip |
Remove internal state BOUND from inet_drv
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}; |