Skip to content

🔥 Do not detaches sockets / terminates client stream - #2173

Merged
AlexV525 merged 7 commits into
mainfrom
fix/closed-socket
Apr 11, 2024
Merged

AlexV525 merged 7 commits into
mainfrom
fix/closed-socket

Conversation

@AlexV525

@AlexV525 AlexV525 commented Apr 3, 2024 •

Copy link
Copy Markdown
Member

Fixes #2170

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

@AlexV525

AlexV525 commented Apr 8, 2024

Copy link
Copy Markdown
Member Author

I've failed to write tests for these changes. I've tried using regular implementation and also Mockito, the detachSocket or terminate happens after the current event loop of the request. Now we stop calling them means no innovations. And the exception requires some duration gap which I cannot find during my tests writing.

@AlexV525
AlexV525 marked this pull request as ready for review April 8, 2024 17:41
@AlexV525
AlexV525 requested a review from a team as a code owner April 8, 2024 17:41
@AlexV525
AlexV525 marked this pull request as draft April 8, 2024 23:37
@AlexV525

AlexV525 commented Apr 9, 2024

Copy link
Copy Markdown
Member Author

I'm probably running into the state that some contents are using the main ref. The test works well locally.

@AlexV525
AlexV525 marked this pull request as ready for review April 9, 2024 02:00
@kuhnroyal

Copy link
Copy Markdown
Member

Looks reasonable, we should find a reproducible test case before we merge this imo.

@AlexV525

Copy link
Copy Markdown
Member Author

Looks reasonable, we should find a reproducible test case before we merge this imo.

I'd appreciate any ideas. I still cannot find a solid case unless we can make some integration tests.

@AlexV525

Copy link
Copy Markdown
Member Author

Oh babe, coding is such a poetic act that can only be solved if you have feelings.

I've added relevant tests and all passed locally.

dio http2
image image

@AlexV525
AlexV525 force-pushed the fix/closed-socket branch from 7e0a8d5 to 537832e Compare April 11, 2024 04:17
@github-actions

Copy link
Copy Markdown
Contributor

Code Coverage Report

Package Base Coverage New Coverage Difference
dio 🟢 80.26% 🟢 81.24% 🟢 0.98%
Overall Coverage 🟢 80.26% 🟢 81.24% 🟢 0.98%

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

@AlexV525
AlexV525 requested a review from kuhnroyal April 11, 2024 11:33
@AlexV525
AlexV525 merged commit 6656bd5 into main Apr 11, 2024
@AlexV525
AlexV525 deleted the fix/closed-socket branch April 11, 2024 14:26
wilinz pushed a commit to wilinz/dio that referenced this pull request Aug 31, 2026
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.

Connection closed before response was received

2 participants