summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/stream.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-10-10 22:13:32 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2018-10-10 22:13:32 +0900
commit2dea88a147f4964499d9afad04d9653d28e7c021 (patch)
treef48ddf34166798fe20f1ba67d7d2c79052266eb8 /src/client/app/common/scripts/stream.ts
parent10.6.0 (diff)
downloadsharkey-2dea88a147f4964499d9afad04d9653d28e7c021.tar.gz
sharkey-2dea88a147f4964499d9afad04d9653d28e7c021.tar.bz2
sharkey-2dea88a147f4964499d9afad04d9653d28e7c021.zip
Update stream.ts
Diffstat (limited to 'src/client/app/common/scripts/stream.ts')
-rw-r--r--src/client/app/common/scripts/stream.ts6
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;