From 2dea88a147f4964499d9afad04d9653d28e7c021 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 10 Oct 2018 22:13:32 +0900 Subject: [PATCH] Update stream.ts --- src/client/app/common/scripts/stream.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/app/common/scripts/stream.ts b/src/client/app/common/scripts/stream.ts index 215f93703..2ff3975d5 100644 --- a/src/client/app/common/scripts/stream.ts +++ b/src/client/app/common/scripts/stream.ts @@ -29,7 +29,8 @@ export default class Stream extends EventEmitter { this.stream.addEventListener('message', this.onMessage); } - public useSharedConnection = (channel: string): SharedConnection => { + @autobind + public useSharedConnection(channel: string): SharedConnection { let pool = this.sharedConnectionPools.find(p => p.channel === channel); if (pool == null) { @@ -47,7 +48,8 @@ export default class Stream extends EventEmitter { this.sharedConnections = this.sharedConnections.filter(c => c !== connection); } - public connectToChannel = (channel: string, params?: any): NonSharedConnection => { + @autobind + public connectToChannel(channel: string, params?: any): NonSharedConnection { const connection = new NonSharedConnection(this, channel, params); this.nonSharedConnections.push(connection); return connection;