fix(core): update

This commit is contained in:
Philipp Kunz 2019-08-22 16:22:19 +02:00
parent 0dfb763b17
commit 128c9f9751

View File

@ -38,11 +38,14 @@ export class ProxyWorker {
}); });
}); });
const Websocket = await import('ws');
// Enable websockets // Enable websockets
const wss = new plugins.ws.Server({ server: this.httpsServer }); const wss = new plugins.ws.Server({ server: this.httpsServer });
wss.on('connection', function connection(ws) { wss.on('connection', function connection(ws) {
const wscConnected = plugins.smartpromise.defer(); const wscConnected = plugins.smartpromise.defer();
const wsc = new plugins.ws(`${ws.url}`);
const wsc = new Websocket.default(`${ws.url}`);
wsc.on('open', () => { wsc.on('open', () => {
wscConnected.resolve(); wscConnected.resolve();
}); });