Assorted initialization cleanup and similar, found by valgrind and warnings

This commit is contained in:
Henrik Rydgård committed 2023-01-30 18:31:49 +01:00
1 parent 0f52954eae
commit b97749d623
8 files changed
+21 -18

No files matched your search

+2 -1
View File
@@ -37,8 +37,9 @@ bool Buffer::FlushSocket(uintptr_t sock, double timeout, bool *cancelled) {
}
}
int sent = send(sock, &data_[pos], (int)(end - pos), MSG_NOSIGNAL);
// TODO: Do we need some retry logic here, instead of just giving up?
if (sent < 0) {
ERROR_LOG(IO, "FlushSocket failed");
ERROR_LOG(IO, "FlushSocket failed to send: %d", errno);
return false;
}
pos += sent;