diff --git a/packages/stack/proxy/src/index.ts b/packages/stack/proxy/src/index.ts index cb7a18341..da422376b 100644 --- a/packages/stack/proxy/src/index.ts +++ b/packages/stack/proxy/src/index.ts @@ -140,23 +140,20 @@ export default class ProxyManager { isWs: false, logger: this.logger, plugins: this.plugins - }) - .serve( - this.host, - this.rpcPort, - ); + }); + + this.httpProxy.serve(this.host, this.rpcPort); this.logger.info(`HTTP Proxy for node endpoint ${endpoint} listening on ${buildUrl("http", this.host, this.rpcPort, "rpc")}`); + if (this.isWs) { this.wsProxy = await new Proxy({ events: this.events, isWs: true, logger: this.logger, plugins: this.plugins - }) - .serve( - this.host, - this.wsPort, - ); + }); + + this.wsProxy.serve(this.host, this.wsPort); this.logger.info(`WS Proxy for node endpoint ${endpoint} listening on ${buildUrl("ws", this.host, this.wsPort, "ws")}`); } }