提交 c4664603 编写于 作者: S Simon Fels

Check errno correctly for errors to ignore

上级 9f69c580
......@@ -118,7 +118,7 @@ void BufferedIOStream::thread_main() {
const auto written = messenger_->send_raw(
buffer.data() + (buffer.size() - bytes_left), bytes_left);
if (written < 0) {
if (errno != EINTR || errno != EAGAIN) {
if (errno != EINTR && errno != EAGAIN) {
ERROR("Failed to write data: %s", std::strerror(errno));
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册