@vpalmisano/webrtcperf 4.7.6 → 4.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpalmisano/webrtcperf",
3
- "version": "4.7.6",
3
+ "version": "4.7.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/vpalmisano/webrtcperf.git"
package/src/app.ts CHANGED
@@ -164,6 +164,11 @@ export class Application extends EventEmitter {
164
164
  if (error) {
165
165
  console.warn(`Session ${id} stopped with error: ${error.message}, reloading...`)
166
166
  setTimeout(() => this.startSession(id, spawnPeriod), spawnPeriod)
167
+ } else {
168
+ this.stats.removeSession(id)
169
+ if (!this.stats.sessions.size) {
170
+ this.stop()
171
+ }
167
172
  }
168
173
  })
169
174
  this.stats.addSession(session)
package/src/utils.ts CHANGED
@@ -41,7 +41,13 @@ const log = logger('webrtcperf:utils')
41
41
  * @returns The absolute path.
42
42
  */
43
43
  export function resolvePackagePath(relativePath: string): string {
44
- for (const d of [path.dirname(__filename), __dirname, __dirname + '/..', __dirname + '/../..']) {
44
+ for (const d of [
45
+ path.dirname(__filename),
46
+ __dirname,
47
+ __dirname + '/..',
48
+ __dirname + '/../..',
49
+ __dirname + '/../../..',
50
+ ]) {
45
51
  const p = path.normalize(path.join(d, relativePath))
46
52
  if (fs.existsSync(p)) {
47
53
  log.debug(`resolvePackagePath (dirname: ${__dirname})`, p)