Simplify WebSocket keepalive logic
This commit is contained in:
parent
adc8513f41
commit
7abd2280bc
3 changed files with 88 additions and 81 deletions
|
@ -142,6 +142,7 @@ export class SocketManager extends EventListener {
|
|||
path: '/v1/websocket/',
|
||||
query: { login: username, password },
|
||||
resourceOptions: {
|
||||
name: 'authenticated',
|
||||
keepalive: { path: '/v1/keepalive' },
|
||||
handleRequest: (req: IncomingWebSocketRequest): void => {
|
||||
this.queueOrHandleRequest(req);
|
||||
|
@ -269,6 +270,7 @@ export class SocketManager extends EventListener {
|
|||
name: 'provisioning',
|
||||
path: '/v1/websocket/provisioning/',
|
||||
resourceOptions: {
|
||||
name: 'provisioning',
|
||||
handleRequest: (req: IncomingWebSocketRequest): void => {
|
||||
handler.handleRequest(req);
|
||||
},
|
||||
|
@ -483,6 +485,7 @@ export class SocketManager extends EventListener {
|
|||
name: 'unauthenticated',
|
||||
path: '/v1/websocket/',
|
||||
resourceOptions: {
|
||||
name: 'unauthenticated',
|
||||
keepalive: { path: '/v1/keepalive' },
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue