-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Hi team,
I'm encountering an issue when the WebSocket connection is unstable or missing. Specifically, I'm seeing the following error
ReferenceError: WebSocket is not defined
at Timeout._onTimeout (/Users/susu/comfyui-api/node_modules/@saintno/comfyui-sdk/build/index.cjs:1:16526)
at listOnTimeout (node:internal/timers:569:17)
at processTimers (node:internal/timers:512:7)
This happens in a Node.js environment, where the WebSocket global is not available by default.
I have a couple of questions:
Should the SDK handle the absence or failure of WebSocket more gracefully?
Is there a recommended pattern for handling reconnection or fallback logic in this case?
Would it make sense to allow passing in a custom WebSocket implementation (e.g., ws for Node) as a config?
Any guidance or best practices would be appreciated. Thanks!
Metadata
Metadata
Assignees
Labels
No labels