Close connections when window closed

Fixes #8
This commit is contained in:
Thomas Nordquist
2019-01-14 11:23:46 +01:00
parent 611fde13e2
commit ad78ca03d8
2 changed files with 10 additions and 0 deletions

View File

@@ -57,6 +57,11 @@ export class ConnectionManager {
connection.disconnect()
delete this.connections[hash]
}
public closeAllConnections() {
Object.keys(this.connections)
.forEach(hash => this.removeConnection(hash))
}
}
class UpdateNotifier {