diff options
Diffstat (limited to 'sdnr/wt/odlux/framework/src/services')
-rw-r--r-- | sdnr/wt/odlux/framework/src/services/forceLogoutService.ts | 9 | ||||
-rw-r--r-- | sdnr/wt/odlux/framework/src/services/notificationService.ts | 11 |
2 files changed, 14 insertions, 6 deletions
diff --git a/sdnr/wt/odlux/framework/src/services/forceLogoutService.ts b/sdnr/wt/odlux/framework/src/services/forceLogoutService.ts index ce4faab6b..0c7c38dff 100644 --- a/sdnr/wt/odlux/framework/src/services/forceLogoutService.ts +++ b/sdnr/wt/odlux/framework/src/services/forceLogoutService.ts @@ -27,11 +27,16 @@ let tickTimer = 15; export const startForceLogoutService = (store: ApplicationStore) => { applicationStore = store; - createForceLogoutInterval(); + if (process.env.NODE_ENV === "development") { + console.warn("logout timer not started in development mode"); + } else { + createForceLogoutInterval(); + } + }; const createForceLogoutInterval = () => { - console.log("logout timer running...") + console.log("logout timer running..."); return setInterval(function () { if (applicationStore && applicationStore.state.framework.authenticationState.user) { diff --git a/sdnr/wt/odlux/framework/src/services/notificationService.ts b/sdnr/wt/odlux/framework/src/services/notificationService.ts index 85d3f716b..c90da0946 100644 --- a/sdnr/wt/odlux/framework/src/services/notificationService.ts +++ b/sdnr/wt/odlux/framework/src/services/notificationService.ts @@ -179,10 +179,13 @@ export const startWebsocketSession = () => { }
export const endWebsocketSession = () => {
- socketReady.then(websocket => {
- websocket.close();
- userLoggedOut = true;
- })
+ if (socketReady) {
+ socketReady.then(websocket => {
+ websocket.close();
+ userLoggedOut = true;
+ });
+ }
+
}
|