summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2013-06-18 16:05:54 -0700
committerJeff Brown <jeffbrown@google.com>2013-06-18 16:10:49 -0700
commit0618148f9031129540631b6d5aa823377e993415 (patch)
tree17acc57cfc16d9e95c0757e15b38f53f2e2fce02 /libs
parent736d4ddcdcd74165ad292b136468207644b28f9d (diff)
downloadframeworks_base-0618148f9031129540631b6d5aa823377e993415.zip
frameworks_base-0618148f9031129540631b6d5aa823377e993415.tar.gz
frameworks_base-0618148f9031129540631b6d5aa823377e993415.tar.bz2
input: Handle a few extra error conditions.
It turns out that SOCK_SEQPACKET sockets may sometimes return ECONNREFUSED or ECONNRESET errors when the peer dies instead of the usual EPIPE. Bug: 9479906 Change-Id: Ia7e572b08bf63e43ba5aeda58281508beb5f8c73
Diffstat (limited to 'libs')
-rw-r--r--libs/androidfw/InputTransport.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/androidfw/InputTransport.cpp b/libs/androidfw/InputTransport.cpp
index 498389e..cfbc923 100644
--- a/libs/androidfw/InputTransport.cpp
+++ b/libs/androidfw/InputTransport.cpp
@@ -159,7 +159,7 @@ status_t InputChannel::sendMessage(const InputMessage* msg) {
if (error == EAGAIN || error == EWOULDBLOCK) {
return WOULD_BLOCK;
}
- if (error == EPIPE || error == ENOTCONN) {
+ if (error == EPIPE || error == ENOTCONN || error == ECONNREFUSED || error == ECONNRESET) {
return DEAD_OBJECT;
}
return -error;
@@ -193,7 +193,7 @@ status_t InputChannel::receiveMessage(InputMessage* msg) {
if (error == EAGAIN || error == EWOULDBLOCK) {
return WOULD_BLOCK;
}
- if (error == EPIPE || error == ENOTCONN) {
+ if (error == EPIPE || error == ENOTCONN || error == ECONNREFUSED) {
return DEAD_OBJECT;
}
return -error;