Index: src/debug-agent.cc |
diff --git a/src/debug-agent.cc b/src/debug-agent.cc |
index 511663d8eeaab57c45639746e93c9ca1b3b6d049..a7015bfa206bb99f91728541fe98a225c69b6384 100644 |
--- a/src/debug-agent.cc |
+++ b/src/debug-agent.cc |
@@ -247,7 +247,7 @@ SmartArrayPointer<char> DebuggerAgentUtil::ReceiveMessage(const Socket* conn) { |
while (!(c == '\n' && prev_c == '\r')) { |
prev_c = c; |
received = conn->Receive(&c, 1); |
- if (received <= 0) { |
+ if (received == 0) { |
PrintF("Error %d\n", Socket::LastError()); |
return SmartArrayPointer<char>(); |
} |
@@ -454,7 +454,7 @@ int DebuggerAgentUtil::ReceiveAll(const Socket* conn, char* data, int len) { |
int total_received = 0; |
while (total_received < len) { |
int received = conn->Receive(data + total_received, len - total_received); |
- if (received <= 0) { |
+ if (received == 0) { |
return total_received; |
} |
total_received += received; |