mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix proxy retry counter cleanup on success (#1825)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
d35feab6ea
commit
c839e6fdfc
@ -120,6 +120,14 @@ export class LensProxy {
|
|||||||
protected createProxy(): httpProxy {
|
protected createProxy(): httpProxy {
|
||||||
const proxy = httpProxy.createProxyServer();
|
const proxy = httpProxy.createProxyServer();
|
||||||
|
|
||||||
|
proxy.on("proxyRes", (proxyRes, req) => {
|
||||||
|
const retryCounterId = this.getRequestId(req);
|
||||||
|
|
||||||
|
if (this.retryCounters.has(retryCounterId)) {
|
||||||
|
this.retryCounters.delete(retryCounterId);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
proxy.on("error", (error, req, res, target) => {
|
proxy.on("error", (error, req, res, target) => {
|
||||||
if (this.closed) {
|
if (this.closed) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user