From f9d866904ef6c2b42be5a2c6548ed52f055dc70b Mon Sep 17 00:00:00 2001 From: Fran Ortiz Date: Mon, 2 Jun 2025 16:11:38 +0200 Subject: [PATCH] fix(MCPEntrypoint): wait for init to finish before executing onSSE --- src/modules/MCPEntrypoint.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/MCPEntrypoint.ts b/src/modules/MCPEntrypoint.ts index 27e5f77..ac0486c 100644 --- a/src/modules/MCPEntrypoint.ts +++ b/src/modules/MCPEntrypoint.ts @@ -54,7 +54,7 @@ export abstract class DurableMCP< const namespace = c.env[binding] const object = namespace.get(namespace.newUniqueId()) // @ts-ignore - object._init(c.executionCtx.props) + await object._init(c.executionCtx.props) return await object.onSSE(c.req.raw) as unknown as Response })