Trap23待办3: 异常释放(TIMEOUT/RST)挂起recv以CONNRESET了结, STOR异常结束回450并删除截断文件, 探针加--check-abort

This commit is contained in:
2026-09-25 02:04:46 +08:00
parent a1f1f46262
commit c12139da06
5 changed files with 85 additions and 10 deletions
+3
View File
@@ -199,6 +199,9 @@ static int receive_file(int socket, const char *path)
lftpd_io_close(fh);
if (err < 0) {
/* 异常结束(连接重置/超时/预算耗尽):删除截断文件防残留并返回错误码
* → STOR 回报 450 而非误报 226(Trap 23 待办 #3) */
lftpd_io_unlink(path);
return err;
}
if (total == 0) {