diff options
author | Anders Svensson <anders@erlang.org> | 2014-03-19 11:30:55 +0100 |
---|---|---|
committer | Anders Svensson <anders@erlang.org> | 2014-03-20 18:27:53 +0100 |
commit | c2d88d4b3fec56ac6def50ecc651dc1cefd1bf5d (patch) | |
tree | e813cdb6e869839592b20cc5ebae569545c95d47 | |
parent | 23790daf1a2d384b0fc11c655fa825151d9fa420 (diff) | |
download | otp-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.
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 4 |
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; |