Compare commits

...

2 Commits

Author SHA1 Message Date
Derrick Hammer a24a0414ce
*Update dist 2023-02-01 12:57:30 -05:00
Derrick Hammer 7730595b48
*http listen doesnt exist in browser 2023-02-01 12:57:11 -05:00
2 changed files with 8 additions and 3 deletions

4
dist/index.js vendored
View File

@ -55,7 +55,9 @@ class HandshakeProxy extends libhyperproxy_1.Proxy {
createServer: libhyperproxy_1.createServer,
createSocket: libhyperproxy_1.createSocket,
});
this._node.http.http.listen = (port, host, cb) => cb();
if (this?._node?.http?.http?.listen) {
this._node.http.http.listen = (port, host, cb) => cb();
}
await this._node.open();
this._node.pool.connected = true;
this._node.startSync();

View File

@ -68,8 +68,11 @@ export default class HandshakeProxy extends Proxy {
createSocket,
});
this._node.http.http.listen = (port: number, host: string, cb: Function) =>
cb();
if(this?._node?.http?.http?.listen){
this._node.http.http.listen = (port: number, host: string, cb: Function) =>
cb();
}
await this._node.open();
this._node.pool.connected = true;