fix:修正写入失败判断。
This commit is contained in:
parent
654b637e7f
commit
9a284b846b
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -20,7 +20,7 @@
|
|||||||
],
|
],
|
||||||
"visualizerFile": "${workspaceRoot}/.vscode/qt5.natvis",
|
"visualizerFile": "${workspaceRoot}/.vscode/qt5.natvis",
|
||||||
"args": [
|
"args": [
|
||||||
"-h"
|
"-n", "1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"cmake.environment": {
|
"cmake.environment": {
|
||||||
|
@ -476,11 +476,10 @@ void CClient::handle_frame(CFrameBuffer* buf)
|
|||||||
th_down_active_ = std::thread([&]() { judget_down_active(); });
|
th_down_active_ = std::thread([&]() { judget_down_active(); });
|
||||||
}
|
}
|
||||||
down_->file_.write(buf->data_, buf->len_);
|
down_->file_.write(buf->data_, buf->len_);
|
||||||
auto ws = down_->file_.gcount();
|
if (down_->file_.fail()) {
|
||||||
if (static_cast<int>(ws) != buf->len_) {
|
|
||||||
logger_->warn("no matched write and data.");
|
logger_->warn("no matched write and data.");
|
||||||
}
|
}
|
||||||
cur_down_size_ += ws;
|
cur_down_size_ += buf->len_;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TYPE_OPEN_FILE: {
|
case TYPE_OPEN_FILE: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user