This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git


The following commit(s) were added to refs/heads/master by this push:
     new 50fab5f  database.delete is async, so we need to await it
50fab5f is described below

commit 50fab5f0f2b5d3eeb6f4c0cf3d57e234be43f0e3
Author: Daniel Gruno <humbed...@apache.org>
AuthorDate: Mon Jul 1 18:53:56 2024 +0200

    database.delete is async, so we need to await it
---
 server/plugins/session.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins/session.py b/server/plugins/session.py
index e08cdc0..beff4a5 100644
--- a/server/plugins/session.py
+++ b/server/plugins/session.py
@@ -144,7 +144,7 @@ async def get_session(
             session.cookie = session_id
             # Check that this cookie ain't too old. If it is, delete it and 
return bare-bones session object
             if (now - last_update) > FOAL_MAX_SESSION_AGE:
-                session.database.delete(
+                await session.database.delete(
                     index=session.database.dbs.db_session, id=session_id
                 )
                 return session

Reply via email to