Bug 1037342: Close file descriptor in BluetoothSocket (under bluetooth2/), r=btian

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-17 09:44:19 +02:00
Родитель 3a7e7df6a3
Коммит 51dbdb677a
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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;
}