diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2018-10-10 22:13:32 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-10-10 22:13:32 +0900 |
| commit | 2dea88a147f4964499d9afad04d9653d28e7c021 (patch) | |
| tree | f48ddf34166798fe20f1ba67d7d2c79052266eb8 /src/client/app | |
| parent | 10.6.0 (diff) | |
| download | sharkey-2dea88a147f4964499d9afad04d9653d28e7c021.tar.gz sharkey-2dea88a147f4964499d9afad04d9653d28e7c021.tar.bz2 sharkey-2dea88a147f4964499d9afad04d9653d28e7c021.zip | |
Update stream.ts
Diffstat (limited to 'src/client/app')
| -rw-r--r-- | src/client/app/common/scripts/stream.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/app/common/scripts/stream.ts b/src/client/app/common/scripts/stream.ts index 215f93703a..2ff3975d5f 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; |