No error message for untagging a cookie don't exist
The skDestroyListener tries to untag every single socket get destroyed
and most of them do not have any tag information. We should ignore those
ENOENT errors otherwise the trafficController error message will flood
the logcat.
Test: device boot and no error message for ENOENT error in untag socket.
Bug: 111441138
Change-Id: I66a3bc8ee4b049359cd783149c511ace0b38240f
diff --git a/server/TrafficController.cpp b/server/TrafficController.cpp
index 325ebaf..719dd19 100644
--- a/server/TrafficController.cpp
+++ b/server/TrafficController.cpp
@@ -241,7 +241,7 @@
(static_cast<uint64_t>(diagmsg.id.idiag_cookie[1]) << 32);
Status s = mCookieTagMap.deleteValue(sock_cookie);
- if (!isOk(s)) {
+ if (!isOk(s) && s.code() != ENOENT) {
ALOGE("Failed to delete cookie %" PRIx64 ": %s", sock_cookie, toString(s).c_str());
return;
}