aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/net_kernel.erl
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-02 16:56:13 +0100
committerSverker Eriksson <[email protected]>2018-03-02 19:16:48 +0100
commit3e580e039a8eb2467c638503bc526116fe829fec (patch)
treeb4cb3f9e9e51c66370bb05733d669851121cadf8 /lib/kernel/src/net_kernel.erl
parente8d0a8654ecf85f89a0c0f7aa26da8bc467e9373 (diff)
downloadotp-3e580e039a8eb2467c638503bc526116fe829fec.tar.gz
otp-3e580e039a8eb2467c638503bc526116fe829fec.tar.bz2
otp-3e580e039a8eb2467c638503bc526116fe829fec.zip
kernel,stdlib: Remove obsolete use of send with 'noconnect'
as workarounds to avoid blocking auto-connect, which is now asynchronous in OTP-21. Also changed old catch to more efficient try-catch.
Diffstat (limited to 'lib/kernel/src/net_kernel.erl')
-rw-r--r--lib/kernel/src/net_kernel.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/kernel/src/net_kernel.erl b/lib/kernel/src/net_kernel.erl
index cdb10a7b12..f38989d103 100644
--- a/lib/kernel/src/net_kernel.erl
+++ b/lib/kernel/src/net_kernel.erl
@@ -1777,16 +1777,16 @@ async_reply({reply, Msg, State}, From) ->
async_gen_server_reply(From, Msg) ->
{Pid, Tag} = From,
M = {Tag, Msg},
- case catch erlang:send(Pid, M, [nosuspend, noconnect]) of
+ try erlang:send(Pid, M, [nosuspend, noconnect]) of
ok ->
ok;
nosuspend ->
_ = spawn(fun() -> catch erlang:send(Pid, M, [noconnect]) end),
ok;
noconnect ->
- ok; % The gen module takes care of this case.
- {'EXIT', _} ->
- ok
+ ok % The gen module takes care of this case.
+ catch
+ _:_ -> ok
end.
call_owner(Owner, Msg) ->