aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_session_cache.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2015-09-04 16:13:08 +0200
committerIngela Anderton Andin <[email protected]>2015-09-15 15:47:38 +0200
commitb2c0bef3cff85784b2ccb3b91bbea997acab6187 (patch)
treeb278321f59e2169f0e3400018372bfdfb246c24e /lib/ssl/src/ssl_session_cache.erl
parent0d2bebf94d99b2d3bd39c5731ac81122f3ea7fb7 (diff)
downloadotp-b2c0bef3cff85784b2ccb3b91bbea997acab6187.tar.gz
otp-b2c0bef3cff85784b2ccb3b91bbea997acab6187.tar.bz2
otp-b2c0bef3cff85784b2ccb3b91bbea997acab6187.zip
ssl: Correct return value of default session callback module
ssl_session_cache:select_session/2 returned [sesionid(), #session{}] instead of #session{} as the API demands. This was wrongly compensated for in the code in one place making it look like everything was good. But the client check for unique session would always fail, potentially making the client session table grow a lot and causing long setup times.
Diffstat (limited to 'lib/ssl/src/ssl_session_cache.erl')
-rw-r--r--lib/ssl/src/ssl_session_cache.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssl/src/ssl_session_cache.erl b/lib/ssl/src/ssl_session_cache.erl
index 11ed310477..cfc48cd935 100644
--- a/lib/ssl/src/ssl_session_cache.erl
+++ b/lib/ssl/src/ssl_session_cache.erl
@@ -83,7 +83,7 @@ foldl(Fun, Acc0, Cache) ->
%%--------------------------------------------------------------------
select_session(Cache, PartialKey) ->
ets:select(Cache,
- [{{{PartialKey,'$1'}, '$2'},[],['$$']}]).
+ [{{{PartialKey,'_'}, '$1'},[],['$1']}]).
%%--------------------------------------------------------------------
%%% Internal functions