We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fe1b54 commit 7a324bdCopy full SHA for 7a324bd
packages/middleware-endpoint-discovery/src/updateDiscoveredEndpointInCache.ts
@@ -76,6 +76,11 @@ export const updateDiscoveredEndpointInCache = async (
76
}
77
78
if (options.isDiscoveredEndpointRequired) {
79
+ // The cache entry must be deleted in this case
80
+ // because a subsequent blocking request will be stuck
81
+ // in a waiting state if it sees the cache entry
82
+ // but we have already flushed the request queue.
83
+ endpointCache.delete(cacheKey);
84
reject(errorToThrow);
85
} else {
86
// Endpoint Discovery is optional. No error needs to be thrown.
0 commit comments