Skip to content

Commit 1447e25

Browse files
committed
add enterprise guard
1 parent 809ff5f commit 1447e25

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

reflex/app.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,19 @@ def _setup_state(self) -> None:
529529

530530
# Set up the Socket.IO AsyncServer.
531531
if not self.sio:
532+
if (
533+
config.transport == "polling"
534+
and (tier := prerequisites.get_user_tier()) != "enterprise"
535+
):
536+
console.error(
537+
"The 'polling' transport is only available for Enterprise users. "
538+
+ (
539+
"Please upgrade your plan to use this feature."
540+
if tier != "anonymous"
541+
else "Please log in with `reflex login` to use this feature."
542+
)
543+
)
544+
raise SystemExit(1)
532545
self.sio = AsyncServer(
533546
async_mode="asgi",
534547
cors_allowed_origins=(

0 commit comments

Comments
 (0)