From b3a4948dcd1a80fb6e4ddbf7b1e84707910c7a7c Mon Sep 17 00:00:00 2001 From: saif_eddine_hasnaoui Date: Wed, 8 Jun 2022 16:17:08 +0200 Subject: [PATCH] trigger disconnect event when reloading the page --- src/config/socket-io.config.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config/socket-io.config.ts b/src/config/socket-io.config.ts index f9384ea..9dd5218 100644 --- a/src/config/socket-io.config.ts +++ b/src/config/socket-io.config.ts @@ -120,6 +120,11 @@ export interface SocketIoConfig { extraHeaders?: { [header: string]: string; }; + + /** + * decide whether to trigger disconnect event when reloading the page or not + * */ + closeOnBeforeunload?: boolean; // Additional options for NodeJS Engine.IO clients omitted: https://socket.io/docs/client-api/ };