fix(ftp-server): large transfer leads to client timeout #7639
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.
刚刚pr合并的时候我还在测,结果真的就发现了两个bug,哭了。
问题1:上传大文件结束时,服务端会阻塞式地将本地的临时文件上传到网盘,期间FTP客户端会显示100%不动。这本来是预期的行为,但某些FTP客户端在这种情况下会认为上传超时失败,所以只能改成不阻塞的“以任务形式上传”
问题2:临时文件不会自动删除,而且挂载另一个AListV3时没法上传,发现是因为临时文件在
SetTmpFile
以后还得手动加入Closers
里面,否则文件不能自动关闭。