Skip to content

Conversation

vanelizarov
Copy link

@vanelizarov vanelizarov commented Aug 9, 2025

In some situations, like when ISP infrastructure is down or misconfigured, user may end up long-waiting for handshake to complete with further HandshakeException. In my case it was around 1 minute which is huge. This PR adds an optional param handshakeTimeout to ConnectionManager that after all returns chains with this future in _RawSecureSocket

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest main branch to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I'm adding
  • I have updated the documentation (if necessary)
  • I have run the tests without failures
  • I have updated the CHANGELOG.md in the corresponding package

Additional context and info (if any)

@vanelizarov vanelizarov requested a review from a team as a code owner August 9, 2025 21:52
@vanelizarov
Copy link
Author

any updates?

Comment on lines 143 to 145
try {
stream.outgoingMessages.add(DataStreamMessage(data));
} catch (_) {}
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this?

Copy link
Author

Choose a reason for hiding this comment

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

Eventually, I got a StateError: Bad state: Cannot add event after closing in Crashlytics. I can’t reproduce it locally — maybe it’s caused by some race condition, I’m not sure.

Copy link
Member

Choose a reason for hiding this comment

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

Let's revert until we have a clear path on how to reproduce and what we are fixing.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, sure
Should I add a TODO?

Copy link
Member

@AlexV525 AlexV525 left a comment

Choose a reason for hiding this comment

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

Mostly good to go.

Comment on lines 143 to 145
try {
stream.outgoingMessages.add(DataStreamMessage(data));
} catch (_) {}
Copy link
Member

Choose a reason for hiding this comment

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

Let's revert until we have a clear path on how to reproduce and what we are fixing.

Copy link
Contributor

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
plugins/http2_adapter/lib/src/connection_manager_imp.dart 🟢 78.52% 🟢 78.83% 🟢 0.31%
Overall Coverage 🟢 85.57% 🟢 85.59% 🟢 0.02%

Minimum allowed coverage is 0%, this run produced 85.59%

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.

2 participants