Repository navigation
fix: 修正现代.NET KeepAlive毫秒到秒换算 - #76
Merged
Merged
Conversation
5 tasks
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.
开启 TCP KeepAlive 后,现代 .NET 曾将默认 30000/5000 毫秒直接设置为 30000/5000 秒。本修复按维护者决议将正毫秒向上取整为秒(默认30/5秒,1500ms→2s,1ms→1s),采用先减后除避免 int.MaxValue 溢出。保留正数校验、默认关闭和 netstandard2.0 IOControl 毫秒路径;更新选项说明、双语 README 和 Unreleased。
验证:
dotnet build StreamFrame.slnx -c Release:0警告/0错误。dotnet test StreamFrame.slnx -c Release --no-build:net8 129/129、net10 129/129、net48 121/121通过。单位依据:SocketOptionName(秒)、SIO_KEEPALIVE_VALS(毫秒)。
Closes #62