com.jimuwd.xian.registry-proxy 1.0.68 → 1.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -218,10 +218,10 @@ async function writeResponseToDownstreamClient(registryInfo, targetUrl, resToDow
|
|
|
218
218
|
// clean up when server closes connection to downstream client.
|
|
219
219
|
const cleanup0 = () => {
|
|
220
220
|
resToDownstreamClient.off('close', cleanup0);
|
|
221
|
-
logger.info(`
|
|
221
|
+
logger.info(`Close connection to downstream client, destroy connection, upstream url is ${targetUrl}`);
|
|
222
222
|
/*upstreamResponse.body?.unpipe(); 代理服务器主动关闭与客户端的连接,不需要此时对接管道已经断开了,没必要重复断开*/
|
|
223
|
-
resToDownstreamClient.destroy();
|
|
224
|
-
reqFromDownstreamClient.destroy();
|
|
223
|
+
// resToDownstreamClient.destroy();
|
|
224
|
+
// reqFromDownstreamClient.destroy();
|
|
225
225
|
};
|
|
226
226
|
resToDownstreamClient.on('close', cleanup0);
|
|
227
227
|
// write back body data (chunked probably)
|