Skip to content

Commit

Permalink
ssl: Adjust max table to work as expected from documentation
Browse files Browse the repository at this point in the history
The session table max size should be the configurable value Max and
not Max + 1.
  • Loading branch information
IngelaAndin committed Apr 14, 2016
1 parent 04e7931 commit 256e01c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ssl/src/ssl_manager.erl
Original file line number Diff line number Diff line change
Expand Up @@ -610,8 +610,8 @@ server_register_session(Port, Session, #state{session_cache_server_max = Max,

do_register_session(Key, Session, Max, Pid, Cache, CacheCb) ->
try CacheCb:size(Cache) of
N when N > Max ->
invalidate_session_cache(Pid, CacheCb, Cache);
Max ->
invalidate_session_cache(Pid, CacheCb, Cache);
_ ->
CacheCb:update(Cache, Key, Session),
Pid
Expand Down

0 comments on commit 256e01c

Please sign in to comment.