Skip to content

Update idle handler to avoid unhandled promise rejections - #52

Merged
clue merged 1 commit into
clue:1.xfrom
clue-labs:unhandled-rejections
Oct 17, 2026
Merged

clue merged 1 commit into
clue:1.xfrom
clue-labs:unhandled-rejections

Conversation

@clue

@clue clue commented Oct 17, 2026

Copy link
Copy Markdown
Owner

This changeset updates the idle handler to avoid unhandled promise rejections. Cancelling a connection attempt before the SSH client process is ready, for example due to a timeout, would previously report an unhandled promise rejection with Promise v3. The connection attempt still rejects as before, and the new test covers this for the SshSocksConnector just like it already does for the SshProcessConnector.

Builds on top of reactphp/promise#248, #35, #50 and #8

@clue clue added bug Something isn't working new feature New feature or request labels Oct 17, 2026
@clue clue added this to the v1.5.0 milestone Oct 17, 2026
@clue
clue requested a balanced review from Copilot October 17, 2026 17:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix preserves existing behavior and has no identified blocking issues; tests were not executed.

No open issues 🎉

What changed in this PR

Prevents unhandled Promise v3 rejections during SSH SOCKS connection cancellation while preserving the connection’s rejection behavior.

Changes:

  • Handles rejection in the idle cleanup handler.
  • Adds an integration test for cancellation before SSH startup completes.
File Description
tests/​IntegrationSshSocksConnectorTest.php Tests rejection when a pending connection is cancelled.
src/​SshSocksConnector.php Ignores idle cleanup rejection to prevent unhandled rejection reports.

Review effort: Balanced

@clue
clue merged commit 6912ffd into clue:1.x Oct 17, 2026
16 checks passed
@clue
clue deleted the unhandled-rejections branch October 17, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants