镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(streaming): reject connect promise on socket error or close - #137

Open
mostafaroshdy1 wants to merge 1 commit into
AssemblyAI:mainfrom
mostafaroshdy1:fix/streaming-connection-promise-hang
Open

mostafaroshdy1 wants to merge 1 commit into
AssemblyAI:mainfrom
mostafaroshdy1:fix/streaming-connection-promise-hang

Conversation

@mostafaroshdy1

@mostafaroshdy1 mostafaroshdy1 commented Mar 26, 2026 •

Copy link
Copy Markdown

Ensures the StreamingTranscriber.connect() promise does not hang indefinitely if the WebSocket fails to initialize.

  • Added reject() calls to onerror and onclose handlers.
  • Added reject() to onmessage if an application-level error is received.
  • Fixes issue where DNS failures (ENOTFOUND) cause the process to hang or crash without a catchable error.

if you see a better approach to handle this kind of issues , feel free to drop a comment

#136

Ensures the StreamingTranscriber.connect() promise does not hang indefinitely if the WebSocket fails to initialize.

- Added reject() calls to onerror and onclose handlers.
- Added reject() to onmessage if an application-level error is received.
- Fixes issue where DNS failures (ENOTFOUND) cause the process to hang or crash without a catchable error.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant