diff options
author | Anders Svensson <[email protected]> | 2015-12-20 16:23:20 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-12-20 16:28:19 +0100 |
commit | 516708326db6887190425f5c020e66dfe3666a67 (patch) | |
tree | 9f16c7c28302fcafb680f97d8a9624103afb1a6e /lib/diameter | |
parent | 42493ad886f9b1b3e32e6f1bef084275a4480096 (diff) | |
download | otp-516708326db6887190425f5c020e66dfe3666a67.tar.gz otp-516708326db6887190425f5c020e66dfe3666a67.tar.bz2 otp-516708326db6887190425f5c020e66dfe3666a67.zip |
Be resilient to diameter_service state upgrades
By not failing in code that looks up state: pick_peer and service_info.
Diffstat (limited to 'lib/diameter')
-rw-r--r-- | lib/diameter/src/base/diameter_service.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index a31cef2c8c..ed22ef7801 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -206,7 +206,7 @@ stop_transport(SvcName, [_|_] = Refs) -> info(SvcName, Item) -> case lookup_state(SvcName) of - [#state{} = S] -> + [S] -> service_info(Item, S); [] -> undefined @@ -215,7 +215,12 @@ info(SvcName, Item) -> %% lookup_state/1 lookup_state(SvcName) -> - ets:lookup(?STATE_TABLE, SvcName). + case ets:lookup(?STATE_TABLE, SvcName) of + [#state{}] = L -> + L; + _ -> + [] + end. %% --------------------------------------------------------------------------- %% # subscribe/1 |