mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 937572 - debug build MOZ_ASSERT fails in BluetoothOppManager::Disconnect(), r=echou
This commit is contained in:
parent
1fde7c7c7a
commit
e7995022be
@ -281,7 +281,19 @@ BluetoothOppManager::HandleShutdown()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
sInShutdown = true;
|
||||
Disconnect(nullptr);
|
||||
|
||||
if (mSocket) {
|
||||
mSocket->Disconnect();
|
||||
mSocket = nullptr;
|
||||
}
|
||||
if (mRfcommSocket) {
|
||||
mRfcommSocket->Disconnect();
|
||||
mRfcommSocket = nullptr;
|
||||
}
|
||||
if (mL2capSocket) {
|
||||
mL2capSocket->Disconnect();
|
||||
mL2capSocket = nullptr;
|
||||
}
|
||||
sBluetoothOppManager = nullptr;
|
||||
}
|
||||
|
||||
@ -450,8 +462,10 @@ BluetoothOppManager::StopSendingFile()
|
||||
|
||||
if (mIsServer) {
|
||||
mAbortFlag = true;
|
||||
} else if (mSocket) {
|
||||
mSocket->Disconnect();
|
||||
} else {
|
||||
Disconnect(nullptr);
|
||||
BT_WARNING("%s: No ongoing file transfer to stop", __FUNCTION__);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -514,7 +528,9 @@ BluetoothOppManager::AfterOppConnected()
|
||||
// If we fail to get a mount lock, abort this transaction
|
||||
// Directly sending disconnect-request is better than abort-request
|
||||
BT_WARNING("BluetoothOPPManager couldn't get a mount lock!");
|
||||
Disconnect(nullptr);
|
||||
|
||||
MOZ_ASSERT(mSocket);
|
||||
mSocket->Disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user