Fix FlushSocket() error check.
This commit is contained in:
parent
3c1566b9a7
commit
f26d95dba1
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ bool Buffer::Flush(int fd) {
|
|||
|
||||
bool Buffer::FlushSocket(uintptr_t sock) {
|
||||
for (size_t pos = 0, end = data_.size(); pos < end; ) {
|
||||
size_t sent = send(sock, &data_[pos], end - pos, 0);
|
||||
int sent = send(sock, &data_[pos], end - pos, 0);
|
||||
if (sent < 0) {
|
||||
ELOG("FlushSocket failed");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue