diff options
| author | Erik Larkö <erik@mullvad.net> | 2017-05-28 22:02:27 +0200 |
|---|---|---|
| committer | Erik Larkö <erik@mullvad.net> | 2017-05-28 22:02:27 +0200 |
| commit | fdb86c8ab71493cd10d176505653bb411a6921e2 (patch) | |
| tree | 7ffc0c8554790f03794f29d8c78aa16d7a7f0819 /app/lib | |
| parent | 6daf4bb8d27251a298558f1823d5d198d7c0538e (diff) | |
| parent | 51af2702156304fcad1f18a37710686a0267797d (diff) | |
| download | mullvadvpn-fdb86c8ab71493cd10d176505653bb411a6921e2.tar.xz mullvadvpn-fdb86c8ab71493cd10d176505653bb411a6921e2.zip | |
Merge branch 'ipc-notifications-test'
Diffstat (limited to 'app/lib')
| -rw-r--r-- | app/lib/jsonrpc-ws-ipc.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/jsonrpc-ws-ipc.js b/app/lib/jsonrpc-ws-ipc.js index f3850c430c..3d028c5a23 100644 --- a/app/lib/jsonrpc-ws-ipc.js +++ b/app/lib/jsonrpc-ws-ipc.js @@ -74,14 +74,14 @@ export default class Ipc { this._sendTimeoutMillis = millis; } - on(event: string, listener: (any) => void) { + on(event: string, listener: (any) => void): Promise<*> { // We're currently not actually using the event parameter. // This is because we aren't sure if the backend will use // one subscription per event or one subscription per // event source. log.info('Adding a listener to', event); - this.send('event_subscribe') + return this.send('event_subscribe') .then(subscriptionId => this._subscriptions[subscriptionId] = listener); } |
