Draft
[WIP] Fix duplicate struct registration with v.mod#4
Conversation
Copilot stopped work on behalf of
enghitalo due to an error
December 18, 2025 00:37
enghitalo
pushed a commit
that referenced
this pull request
Jun 20, 2026
… race (vlang#27434) * net.http: bound the TLS server handshake timeout for infinite accept_timeout The TLS server handshake runs on the accept thread, and its timeout was derived directly from `accept_timeout` (`handshake_timeout := accept_timeout`). With `accept_timeout <= 0` (block indefinitely waiting to accept), the handshake timeout therefore became infinite too, so a client that completes the TCP connect and then stalls mid-TLS-handshake wedged the accept loop forever: no new connections were accepted, and `stop()` was never observed. That is the hang class vlang#27429 set out to remove, still reachable for the `accept_timeout <= 0` configuration. Fall back to a finite `tls_handshake_timeout` when `accept_timeout <= 0`. Note: this reverses the deliberate behavior added in "preserve zero TLS handshake timeout"; the corresponding test is updated. Flagging for @medvednikov per the discussion on vlang#27433. (Item #2 from vlang#27433 — read_timeout ignored on HTTPS — was fixed independently on master by "fix master ci failures", so it is not included here. The close_idle fd-reuse race, item #4, is left for a separate change now that master added an out-of-lock net.close on Windows.) Refs vlang#27433. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * net.http: make TLS handshake fallback timeout configurable per Server `tls_handshake_timeout` was a module-level constant with no Server-field override, inconsistent with `read_timeout`, `write_timeout`, and `accept_timeout` which are all `pub mut` fields. Add `Server.tls_handshake_timeout` (default 30 s) and thread it through `tls_accept_timeouts` as a parameter so users who need a tighter budget (hardened public-facing server) or a looser one (embedded devices with slow crypto hardware) can set it directly. Also fix the misleading doc comment: the fallback fires only when `accept_timeout` is explicitly zero or `net.infinite_timeout`, not whenever the user "did not set a finite accept_timeout" (the default is already finite at 30 s). Co-Authored-By: WOZCODE <contact@withwoz.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: WOZCODE <contact@withwoz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.