Bluetooth: AsyncFdWatcher: Fix FD leak
AsyncFdWatcher thread notification pipe fds without close
which causes FD leak under Bluetooth on/off stress test.
Close the notification pipe fds when shut down Bluetooth.
Test: Bluetooth on/off stress test
Change-Id: I7575adec49161f9764f0e070ef3c1043b8295a97
diff --git a/bluetooth/1.0/default/async_fd_watcher.cc b/bluetooth/1.0/default/async_fd_watcher.cc
index bc0bc92..d8714f5 100644
--- a/bluetooth/1.0/default/async_fd_watcher.cc
+++ b/bluetooth/1.0/default/async_fd_watcher.cc
@@ -105,6 +105,9 @@
timeout_cb_ = nullptr;
}
+ close(notification_listen_fd_);
+ close(notification_write_fd_);
+
return 0;
}