Skip to content

Commit

Permalink
Merge pull request #132 from sayefeddine/closeOnBeforeUnoload
Browse files Browse the repository at this point in the history
trigger disconnect event when reloading the page
  • Loading branch information
rodgc authored Sep 12, 2022
2 parents 34d0de7 + b3a4948 commit 3a46788
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/socket-io.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,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/
};
Expand Down

0 comments on commit 3a46788

Please sign in to comment.