Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Avoid error if connection is aborted before internal request object is created #221

Merged
merged 2 commits into from
Jan 31, 2025

Conversation

usualoma
Copy link
Member

@usualoma usualoma commented Jan 26, 2025

Fixes honojs/hono#1695

At this time, since the user is not listening for abort events, so we should return immediately.

usualoma and others added 2 commits January 26, 2025 09:31
…ect is created

At this time, since the user is not listening for abort events, so we should return immediately.
@usualoma
Copy link
Member Author

@yusukebe
Would you please review?

@yusukebe
Copy link
Member

Hey @usualoma

honojs/hono#1695 was fixed by #223. But do we still need to merge this PR?

@usualoma
Copy link
Member Author

Hi @yusukebe

I think it would be better to merge this PR.

It may not be a fatal error, but as in the test case, if the request becomes unstable very early after the connection, and ends with a timeout, the error still occurs.

With this PR change, the existing standard case has no effect (no breaking change), so I think it would be better to merge it to avoid the error.

https://github.com/honojs/node-server/pull/221/files#diff-0d6c5bc426d150635c815993be8fb62aa429b7f22f5351adc7efd6f656ab3598R278-R287

@yusukebe
Copy link
Member

@usualoma

Thank you so much for the explanation! I understood. Merging and shipping a new version!

@yusukebe yusukebe merged commit 4f1b090 into honojs:main Jan 31, 2025
3 checks passed
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.

TypeError: Response body object should not be disturbed or locked
2 participants