Fix crash due to conneciton error

Error report: b6ef904c-b670-41e8-b586-fab52a31006d
This commit is contained in:
Thomas Nordquist
2019-01-27 00:13:06 +01:00
parent 809dbcbd43
commit e0d7f45ab8

View File

@@ -55,8 +55,10 @@ export class ConnectionManager {
public removeConnection(hash: string) { public removeConnection(hash: string) {
const connection = this.connections[hash] const connection = this.connections[hash]
connection.disconnect() if (connection) {
delete this.connections[hash] connection.disconnect()
delete this.connections[hash]
}
} }
public closeAllConnections() { public closeAllConnections() {