Fix live query (#5871)

* Fix live query

* fix test
This commit is contained in:
Antonio Davi Macedo Coelho de Castro
2019-07-30 20:40:54 -07:00
committed by Diamond Lewis
parent d4fa62ae26
commit bde96a9002
2 changed files with 11 additions and 16 deletions

View File

@@ -8,14 +8,16 @@ const WebSocketServer = require('ws').Server;
export class WSAdapter extends WSSAdapter {
constructor(options: any) {
super(options);
const wss = new WebSocketServer({ server: options.server });
wss.on('listening', this.onListen);
wss.on('connection', this.onConnection);
this.options = options;
}
onListen() {}
onConnection(ws) {}
start() {}
start() {
const wss = new WebSocketServer({ server: this.options.server });
wss.on('listening', this.onListen);
wss.on('connection', this.onConnection);
}
close() {}
}