aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src
diff options
context:
space:
mode:
authorTomer Chachamu <[email protected]>2012-05-02 15:30:38 +0200
committerTomer Chachamu <[email protected]>2012-05-02 14:49:43 +0100
commitb991b99f9a7cf875786c7e96970c7aff37c9a6e7 (patch)
tree98e3494a062b9cdce1b9b4ab9c890074e24f1c9c /lib/kernel/src
parentf1a49c45e4b2ec746407fd777ba31fec6cab118e (diff)
downloadotp-b991b99f9a7cf875786c7e96970c7aff37c9a6e7.tar.gz
otp-b991b99f9a7cf875786c7e96970c7aff37c9a6e7.tar.bz2
otp-b991b99f9a7cf875786c7e96970c7aff37c9a6e7.zip
Fix rpc:call/5 for local calls with a finite Timeout
-module(rpc_example). -export([f/0, should_return_ok/0]). should_return_ok() -> {badrpc, timeout} = rpc:call(node(), ?MODULE, f, [], 5000), ok. f() -> Ref = make_ref(), receive Ref -> ok end.
Diffstat (limited to 'lib/kernel/src')
-rw-r--r--lib/kernel/src/rpc.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl
index e214ffa404..a3fc57a124 100644
--- a/lib/kernel/src/rpc.erl
+++ b/lib/kernel/src/rpc.erl
@@ -286,7 +286,7 @@ call(N,M,F,A) ->
Reason :: term(),
Timeout :: timeout().
-call(N,M,F,A,_Timeout) when node() =:= N -> %% Optimize local call
+call(N,M,F,A,infinity) when node() =:= N -> %% Optimize local call
local_call(M,F,A);
call(N,M,F,A,infinity) ->
do_call(N, {call,M,F,A,group_leader()}, infinity);