From ad7fc183d1cf934037d0ce63212a67dbab739f7d Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 22 Jun 2022 23:58:30 +0900 Subject: [PATCH] errno should be used to evaluate error code --- src/h2load.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h2load.cc b/src/h2load.cc index 7d03286f..e950bd28 100644 --- a/src/h2load.cc +++ b/src/h2load.cc @@ -1466,7 +1466,7 @@ int Client::write_udp(const sockaddr *addr, socklen_t addrlen, auto nwrite = sendmsg(fd, &msg, 0); if (nwrite < 0) { - if (nwrite == EAGAIN || nwrite == EWOULDBLOCK) { + if (errno == EAGAIN || errno == EWOULDBLOCK) { return 1; }