Skip to content

Commit

Permalink
istream/sink_fd: use SocketDescriptor::Send()
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Aug 26, 2024
1 parent ca672aa commit 8c3eff4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/istream/sink_fd.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ SinkFd::OnData(std::span<const std::byte> src) noexcept
got_data = true;

ssize_t nbytes = IsAnySocket(fd_type)
? send(fd.Get(), src.data(), src.size(),
MSG_DONTWAIT|MSG_NOSIGNAL)
? SocketDescriptor::FromFileDescriptor(fd).Send(src, MSG_DONTWAIT)
: fd.Write(src);
if (nbytes >= 0) {
ScheduleWrite();
Expand Down

0 comments on commit 8c3eff4

Please sign in to comment.