Fix Win32 socket error handling.
This also fixes -http-proxy support on Windows.
Change-Id: I741b224511c064412ac39351ed4f1b9146a313a5
diff --git a/android/console.c b/android/console.c
index 45da8aa..fa86151 100644
--- a/android/console.c
+++ b/android/console.c
@@ -231,7 +231,7 @@
ret = socket_send( client->sock, buff, len);
#endif
if (ret < 0) {
- if (errno != EINTR && errno != EWOULDBLOCK)
+ if (errno != EINTR && errno != EWOULDBLOCK && errno != EAGAIN)
return;
} else {
buff += ret;
@@ -496,7 +496,7 @@
#endif
if (size < 0) {
D(( "size < 0, exiting with %d: %s\n", errno, errno_str ));
- if (errno != EWOULDBLOCK && errno != EINTR)
+ if (errno != EWOULDBLOCK && errno != EAGAIN && errno != EINTR)
control_client_destroy( client );
return;
}