diff --git a/dist/index.js b/dist/index.js index cb45f45..f8c0343 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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();