Skip to content

Commit

Permalink
more includes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhconnelly committed Nov 22, 2024
1 parent 125491f commit 06e325e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/http/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void ResponseWriter::Write(std::string_view s) {
if (s.size() == 0) return;
if (fwrite(s.data(), 1, s.size(), stream_) == 0) {
LOG(ERROR) << std::format("failed to write to socket: {}",
strerror(errno));
std::strerror(errno));
throw InternalError("failed to write data");
}
}
Expand Down Expand Up @@ -66,7 +66,8 @@ void ResponseWriter::WriteData(std::string_view data) {
sending_data_ = true;
}
if (fwrite(data.data(), 1, data.size(), stream_) < data.size()) {
LOG(ERROR) << std::format("failed to write data: {}", strerror(errno));
LOG(ERROR) << std::format("failed to write data: {}",
std::strerror(errno));
throw InternalError("failed to send data");
}
}
Expand Down

0 comments on commit 06e325e

Please sign in to comment.