aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/rpc.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-03-14 13:14:37 +0100
committerBjörn Gustavsson <[email protected]>2016-03-14 13:14:37 +0100
commitf6711a886eb606d63f4c9c21935f43aea2aabb0a (patch)
treeedf22801ac1aa9ebea65f464c732db03c12cc25f /lib/kernel/src/rpc.erl
parentcfae4c856be7a3d534d6ca77a36297172d1bcea9 (diff)
parentcccf762d93640b707f8e1515604cebcfbe379c04 (diff)
downloadotp-f6711a886eb606d63f4c9c21935f43aea2aabb0a.tar.gz
otp-f6711a886eb606d63f4c9c21935f43aea2aabb0a.tar.bz2
otp-f6711a886eb606d63f4c9c21935f43aea2aabb0a.zip
Merge branch 'bjorn/kernel/rpc/OTP-13409'
* bjorn/kernel/rpc/OTP-13409: Don't throw exceptions from rpc:call() and rpc:block_call() Reduce code duplication in called_node_dies/1 and friends
Diffstat (limited to 'lib/kernel/src/rpc.erl')
-rw-r--r--lib/kernel/src/rpc.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl
index d3db8eb80a..b9284487d2 100644
--- a/lib/kernel/src/rpc.erl
+++ b/lib/kernel/src/rpc.erl
@@ -357,8 +357,12 @@ do_call(Node, Request, Timeout) ->
rpc_check_t({'EXIT', {timeout,_}}) -> {badrpc, timeout};
rpc_check_t(X) -> rpc_check(X).
-rpc_check({'EXIT', {{nodedown,_},_}}) -> {badrpc, nodedown};
-rpc_check({'EXIT', X}) -> exit(X);
+rpc_check({'EXIT', {{nodedown,_},_}}) ->
+ {badrpc, nodedown};
+rpc_check({'EXIT', _}=Exit) ->
+ %% Should only happen if the rex process on the other node
+ %% died.
+ {badrpc, Exit};
rpc_check(X) -> X.