Bug 1035240: Close file descriptor in BluetoothSocket, r=shuang

Currently, BluetoothSocket leaks its file descriptor on close
operations. With this patch when Gecko closes an instance of
BluetoothSocket, the file descriptor is now closed as well.
This commit is contained in:
Thomas Zimmermann 2014-07-11 09:22:51 +02:00
parent cda4777677
commit 9aa352eaf0

View File

@ -145,8 +145,7 @@ public:
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(!mShuttingDownOnIOThread);
RemoveWatchers(READ_WATCHER | WRITE_WATCHER);
Close(); // will also remove fd from I/O loop
mShuttingDownOnIOThread = true;
}