Skip to content

Commit d1b33a6

Browse files
committed
fix(telegram): recover pid-reused ingress claims
1 parent 8682d07 commit d1b33a6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

extensions/telegram/src/telegram-ingress-spool.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ describe("Telegram ingress spool", () => {
258258
});
259259
});
260260

261-
it("does not treat stale claims with reused pids as live-owned", () => {
261+
it("does not treat claims with the current process pid as other live process claims", () => {
262262
const now = Date.now();
263263
expect(
264264
isTelegramSpooledUpdateClaimOwnedByOtherLiveProcess({
@@ -270,7 +270,7 @@ describe("Telegram ingress spool", () => {
270270
claim: {
271271
processId: "other-process",
272272
processPid: process.pid,
273-
claimedAt: now - TELEGRAM_SPOOLED_UPDATE_PROCESSING_STALE_MS - 1,
273+
claimedAt: now,
274274
},
275275
}),
276276
).toBe(false);

extensions/telegram/src/telegram-ingress-spool.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ export function isTelegramSpooledUpdateClaimOwnedByOtherLiveProcess(
212212
return Boolean(
213213
claim.claim &&
214214
claim.claim.processId !== TELEGRAM_SPOOLED_UPDATE_PROCESS_ID &&
215+
claim.claim.processPid !== process.pid &&
215216
isFreshClaimOwner(claim.claim) &&
216217
processExists(claim.claim.processPid),
217218
);

0 commit comments

Comments
 (0)