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

Unified Diff: net/test/local_test_server_posix.cc

Issue 11784004: Make net/test/test_server correctly report timeouts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 12 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/test/local_test_server_posix.cc
diff --git a/net/test/local_test_server_posix.cc b/net/test/local_test_server_posix.cc
index eda65fda605ab3446ffb9586a0356d2a6d7fc1a0..760a915843e0ce812a34bfc2d48add998d81c16b 100644
--- a/net/test/local_test_server_posix.cc
+++ b/net/test/local_test_server_posix.cc
@@ -70,8 +70,12 @@ bool ReadData(int fd, ssize_t bytes_max, uint8* buffer,
int rv = HANDLE_EINTR(poll(poll_fds, 1,
remaining_time->InMilliseconds()));
- if (rv != 1) {
- PLOG(ERROR) << "poll() failed for child file descriptor";
+ if (rv == 0) {
+ LOG(ERROR) << "poll() timed out; bytes_read=" << bytes_read;
+ return false;
+ } else if (rv < 0) {
+ PLOG(ERROR) << "poll() failed for child file descriptor; bytes_read="
+ << bytes_read;
return false;
}
« 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