Compare commits

...

2 Commits

Author SHA1 Message Date
209e5644c0 1.0.23 2019-08-22 16:22:20 +02:00
128c9f9751 fix(core): update 2019-08-22 16:22:19 +02:00
3 changed files with 6 additions and 3 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartproxy", "name": "@pushrocks/smartproxy",
"version": "1.0.22", "version": "1.0.23",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/smartproxy", "name": "@pushrocks/smartproxy",
"version": "1.0.22", "version": "1.0.23",
"private": false, "private": false,
"description": "a proxy for handling high workloads of proxying", "description": "a proxy for handling high workloads of proxying",
"main": "dist/index.js", "main": "dist/index.js",

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();
}); });