handle unlimited connections when terminating sessions. (#536)

This commit is contained in:
Jim authored and GitHub committed 2020-10-05 17:01:22 -04:00
1 parent 9f11d12f6d
commit dc379ed09f
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