Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: net/tools/quic/quic_socket_utils.cc

Issue 1780323002: Correctly handle EINTR during sendmsg in QuicSocketUtils::WritePacket. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116249386
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_socket_utils.cc
diff --git a/net/tools/quic/quic_socket_utils.cc b/net/tools/quic/quic_socket_utils.cc
index 42141dfa17b436892d7efe1d444bb59a181e3417..9c8cac7eef4e56a280329b3dcf1703b51cfa1fc4 100644
--- a/net/tools/quic/quic_socket_utils.cc
+++ b/net/tools/quic/quic_socket_utils.cc
@@ -213,7 +213,10 @@ WriteResult QuicSocketUtils::WritePacket(int fd,
hdr.msg_controllen = cmsg->cmsg_len;
}
- int rc = sendmsg(fd, &hdr, 0);
+ int rc;
+ do {
+ rc = sendmsg(fd, &hdr, 0);
+ } while (rc < 0 && errno == EINTR);
if (rc >= 0) {
return WriteResult(WRITE_STATUS_OK, rc);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698