Repository navigation
fix(smb): 连不上共享时说出原因,超时分为连接与读取 - #182
Merged
Merged
Conversation
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.
<00>判断:IP 主机连接失败(不可达、被拒、连上不回话)不再显示「未知主机」,按 cause 链里的真实类型归类;DNS 和 NetBIOS 名字查不到本来就是UnknownHostException,仍然是「未知主机」ConnectionTimeoutException、socket 连接超时)显示「连接主机超时」,连上之后请求没有回应(RequestTimeoutException)显示「从主机读取超时」验证:LXC 上 CI 同款构建通过,单测 423 个 0 失败;新增和改写的测试都做过变异验证,10 个变异体全部被抓到。异常归类照 jcifs-ng 2.1.10 实测的异常链写:在 LXC 上分别连 TEST-NET 地址、关闭的端口、不回话的端口、不存在的域名和 NetBIOS 短名(不碰 NAS)。平板(SM-X926B,Android 16,调试版)在连不上 NAS 的网络下:「Measure this share」「Find the fastest concurrency」都显示 "Could not open the SMB share: Connecting to the host timed out",保存连接时的自检显示 "Connect failed … Connecting to the host timed out",日志里有完整异常链;「已存到共享」读取失败后保留了旧结果;前后对比 23 个设置键,没有改动。
未验证:SMB 库的「无法打开 SMB 共享:…」只有单测,这次的网络丢包,jcifs 35 秒后才失败,库页面先报 7 秒超时;读取超时没有在设备上触发;各语言译文没有母语者校对。
Closes #180