fix:修正传输完成后,对方断开时误打印不相关信息的错误。
This commit is contained in:
parent
a486b31e4e
commit
32e09d00cb
@ -363,11 +363,7 @@ void CClient::handle_frame(CFrameBuffer* buf)
|
||||
}
|
||||
case TYPE_TRANS_DONE: {
|
||||
logger_->warn("Trans done, close file {}.", down_->cur_file_);
|
||||
if (down_->file_) {
|
||||
fclose(down_->file_);
|
||||
down_->file_ = nullptr;
|
||||
}
|
||||
down_->trans_state_ = TRANS_DONE;
|
||||
report_trans_ret(TRANS_DONE);
|
||||
break;
|
||||
}
|
||||
case TYPE_OFFLINE: {
|
||||
@ -381,7 +377,7 @@ void CClient::handle_frame(CFrameBuffer* buf)
|
||||
t->trans_state_ = TRANS_BREAK;
|
||||
break;
|
||||
}
|
||||
if (!down_->cur_remote_file_.empty()) {
|
||||
if (downloading_ && !down_->cur_remote_file_.empty()) {
|
||||
logger_->warn("Stop Down {} From {}.", down_->cur_remote_file_, buf->fid_);
|
||||
}
|
||||
report_trans_ret(TRANS_FAILED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user