1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

handle aborted responses in lens proxy (#4308)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2021-11-10 13:47:36 +02:00 committed by GitHub
parent c37a8aee0a
commit 8846b5c96f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,10 @@ export class LensProxy extends Singleton {
res.flushHeaders(); res.flushHeaders();
} }
} }
proxyRes.on("aborted", () => { // happens when proxy target aborts connection
res.end();
});
}); });
proxy.on("error", (error, req, res, target) => { proxy.on("error", (error, req, res, target) => {