summaryrefslogtreecommitdiffstats
path: root/adb/adb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'adb/adb.cpp')
-rw-r--r--adb/adb.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/adb/adb.cpp b/adb/adb.cpp
index 0e1859cdd..1c1683e73 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -395,6 +395,11 @@ void handle_packet(apacket *p, atransport *t)
D("Invalid A_OKAY(%d,%d), expected A_OKAY(%d,%d) on transport %s",
p->msg.arg0, p->msg.arg1, s->peer->id, p->msg.arg1, t->serial);
}
+ } else {
+ // When receiving A_OKAY from device for A_OPEN request, the host server may
+ // have closed the local socket because of client disconnection. Then we need
+ // to send A_CLSE back to device to close the service on device.
+ send_close(p->msg.arg1, p->msg.arg0, t);
}
}
break;