handle unlimited connections when terminating sessions. (#536)
This commit is contained in:
4 files changed
+43
-11
No files matched your search
@@ -336,11 +336,15 @@ create or replace function
|
||||
now() > us.expiration_time or
|
||||
-- connection limit reached...
|
||||
(
|
||||
select count (*)
|
||||
from session_connection sc
|
||||
where
|
||||
sc.session_id = us.public_id
|
||||
) >= connection_limit or
|
||||
-- handle unlimited connections...
|
||||
connection_limit != -1 and
|
||||
(
|
||||
select count (*)
|
||||
from session_connection sc
|
||||
where
|
||||
sc.session_id = us.public_id
|
||||
) >= connection_limit
|
||||
) or
|
||||
-- canceled sessions
|
||||
us.public_id in (
|
||||
select
|
||||
|
||||
Reference in new issue
Block a user