Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb33775a authored by Peng Qi's avatar Peng Qi Committed by Cheney Ni
Browse files

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.

Bug: 174630553
Test: Bluetooth on/off stress test

Change-Id: I7575adec49161f9764f0e070ef3c1043b8295a97
(cherry picked from commit 5c6da2669cea95d775b4a1ab0ddcdad4cac82671)
parent f8567ab8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -102,6 +102,9 @@ int AsyncFdWatcher::stopThread() {
    timeout_cb_ = nullptr;
  }

  close(notification_listen_fd_);
  close(notification_write_fd_);

  return 0;
}