*If we have a cached request, release the lock
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Derrick Hammer 2022-11-26 18:23:26 -05:00
parent 9ce66b15a3
commit 86ce21a4b4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -147,6 +147,7 @@ export class RPCServer extends EventEmitter {
let cachedRequest = this.getCachedRequest(request) as RPCCacheItem; let cachedRequest = this.getCachedRequest(request) as RPCCacheItem;
if (cachedRequest) { if (cachedRequest) {
this.getRequestLock(request)?.release();
return cachedRequest.value; return cachedRequest.value;
} }
@ -193,7 +194,7 @@ export class RPCServer extends EventEmitter {
private getCachedRequest(request: RPCRequest): RPCCacheItem | boolean { private getCachedRequest(request: RPCRequest): RPCCacheItem | boolean {
const req = RPCServer.hashQuery(request); const req = RPCServer.hashQuery(request);
if (RPCServer.hashQuery(request) in this._cache.data) { if (RPCServer.hashQuery(request) in this._cache.data) {
this._cache.data[req]; return this._cache.data[req] as RPCCacheItem;
} }
return false; return false;