Fix typos

This commit is contained in:
Thomas Nordquist
2019-06-19 11:56:09 +02:00
parent 7e99c18410
commit 0d585eef8f
7 changed files with 20 additions and 20 deletions

View File

@@ -62,17 +62,17 @@ export class ConnectionManager {
})
}
public removeConnection(conenctionId: string) {
const connection = this.connections[conenctionId]
public removeConnection(connectionId: string) {
const connection = this.connections[connectionId]
if (connection) {
backendEvents.unsubscribeAll(makePublishEvent(conenctionId))
backendEvents.unsubscribeAll(makePublishEvent(connectionId))
connection.disconnect()
delete this.connections[conenctionId]
delete this.connections[connectionId]
connection.stateMachine.onUpdate.removeAllListeners()
}
}
public closeAllConnections() {
Object.keys(this.connections).forEach(conenctionId => this.removeConnection(conenctionId))
Object.keys(this.connections).forEach(connectionId => this.removeConnection(connectionId))
}
}