From 62387e4fc162c3918bca9aedb012348ad04596fa Mon Sep 17 00:00:00 2001 From: mbays Date: Sat, 20 Apr 2024 00:00:00 +0000 Subject: [PATCH] adapt SessionManager to tls-2.0 --- ClientSessionManager.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ClientSessionManager.hs b/ClientSessionManager.hs index 8e8b678..fb8950d 100644 --- a/ClientSessionManager.hs +++ b/ClientSessionManager.hs @@ -38,6 +38,7 @@ clientSessionManager lifetime sess fp = SessionManager (\_ -> return Nothing) insert delete + True where insert sid sd@SessionData{ sessionClientSNI = Just sni } = do now <- timeCurrent @@ -45,7 +46,8 @@ clientSessionManager lifetime sess fp = SessionManager modifyMVar_ sess $ return . Map.insert (sni, fp) (expire,(sid,sd)) . fromAscList . filter (\(_,(t,(_,_))) -> t >= now) . toAscList - insert _ _ = return () + return Nothing + insert _ _ = return Nothing delete sid = modifyMVar_ sess $ return . fromAscList . filter (\(_,(_,(sid',_))) -> sid /= sid') . toAscList -- 2.11.4.GIT