Skip to content

Commit

Permalink
add close event
Browse files Browse the repository at this point in the history
  • Loading branch information
balazskreith committed Jun 17, 2023
1 parent 71213eb commit 36cbf75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@observertc/client-monitor-js",
"version": "2.2.0",
"version": "2.2.1",
"description": "ObserveRTC Client Integration Javascript Library",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/ClientMonitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export type ClientMonitorAlerts = {
}

export interface ClientMonitorEvents {
'close': undefined,
'stats-collected': {
stats: StatsEntry[]
},
Expand Down
1 change: 1 addition & 0 deletions src/ClientMonitorImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ export class ClientMonitorImpl implements ClientMonitor {
this._statsStorage.clear();
} finally {
this._closed = true;
this._emit('close', undefined);
logger.info(`Closed`);
}
}
Expand Down

0 comments on commit 36cbf75

Please sign in to comment.