aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2014-03-19 11:30:55 +0100
committerAnders Svensson <[email protected]>2014-03-20 18:27:53 +0100
commitc2d88d4b3fec56ac6def50ecc651dc1cefd1bf5d (patch)
treee813cdb6e869839592b20cc5ebae569545c95d47 /lib/diameter
parent23790daf1a2d384b0fc11c655fa825151d9fa420 (diff)
downloadotp-c2d88d4b3fec56ac6def50ecc651dc1cefd1bf5d.tar.gz
otp-c2d88d4b3fec56ac6def50ecc651dc1cefd1bf5d.tar.bz2
otp-c2d88d4b3fec56ac6def50ecc651dc1cefd1bf5d.zip
Fix pick_peer case clause failure
In the case of {call_mutates_state, true} configuration on the service in question, any peer selection that failed to select a peer resulted in a case clause failure in diameter_service:pick_peer/5, when the call to the service process returned false. This was noticed in the case of a peer failover in which an alternate peer wasn't available. The explicit matching is intentional, to match exactly what's expected.
Diffstat (limited to 'lib/diameter')
-rw-r--r--lib/diameter/src/base/diameter_service.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 70e66537ed..67778b86f9 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -1390,6 +1390,8 @@ pick_peer(Local, Remote, Pid, _SvcName, #diameter_app{mutable = true} = App)
case call_service(Pid, {pick_peer, Local, Remote, App}) of
{TPid, _} = T when is_pid(TPid) ->
T;
+ false = No ->
+ No;
{error, _} ->
false
end;