mirror of
https://github.com/penpot/penpot.git
synced 2026-09-20 02:46:14 +00:00
In multi-user mode, plugin task requests are published to a Redis channel keyed by user token. When no MCP server instance held a plugin connection for that token (e.g. after the user navigated away from the workspace), the publish reached zero subscribers and the request was silently dropped, so every tool call stalled until the 30-second task timeout instead of failing with a meaningful error. RedisBridge.sendTaskRequest now returns the PUBLISH receiver count and releases its response-channel subscription when the request reached no receiver (or publishing failed), since no response can arrive. PluginBridge uses the count to reject the pending task immediately with the multi-user connection error message; publish failures likewise reject the task instead of surfacing as an unhandled rejection followed by a timeout. The pending- task settlement logic shared with the timeout handler is extracted into a rejectPendingTask helper. AI-assisted-by: claude-fable-5