fix(core): update
This commit is contained in:
parent
db63e7bf79
commit
8087bab197
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/smartproxy',
|
name: '@pushrocks/smartproxy',
|
||||||
version: '3.0.47',
|
version: '3.0.48',
|
||||||
description: 'a proxy for handling high workloads of proxying'
|
description: 'a proxy for handling high workloads of proxying'
|
||||||
}
|
}
|
||||||
|
@ -253,7 +253,14 @@ JNj2Dr5H0XoLFFnvuvzcRbhlJ9J67JzR+7g=
|
|||||||
ws.on('message', async (message) => {
|
ws.on('message', async (message) => {
|
||||||
if (!wscConnectedDeferred) {
|
if (!wscConnectedDeferred) {
|
||||||
wscConnectedDeferred = plugins.smartpromise.defer();
|
wscConnectedDeferred = plugins.smartpromise.defer();
|
||||||
const wsc = new plugins.wsDefault(`wss://${this.router.routeReq(reqArg).destinationIp}:${this.router.routeReq(reqArg).destinationPort}${reqArg.url}`);
|
let wsc;
|
||||||
|
try {
|
||||||
|
wsc = new plugins.wsDefault(`wss://${this.router.routeReq(reqArg).destinationIp}:${this.router.routeReq(reqArg).destinationPort}${reqArg.url}`);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
ws.terminate();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
wsc.on('open', () => {
|
wsc.on('open', () => {
|
||||||
wscConnectedDeferred.resolve(wsc);
|
wscConnectedDeferred.resolve(wsc);
|
||||||
|
Loading…
Reference in New Issue
Block a user