diff --git a/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp b/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp index 29a912044dc..f6ed6773734 100644 --- a/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp +++ b/dom/bluetooth/bluedroid/BluetoothDaemonInterface.cpp @@ -145,15 +145,15 @@ BluetoothDaemonProtocol::Send(DaemonSocketPDU* aPDU, MOZ_ASSERT(mConnection); MOZ_ASSERT(aPDU); - aPDU->SetConsumer(this); - aPDU->SetResultHandler(aRes); - aPDU->UpdateHeader(); - if (mConnection->GetConnectionStatus() == SOCKET_DISCONNECTED) { BT_LOGR("Connection to Bluetooth daemon is closed."); return NS_ERROR_FAILURE; } + aPDU->SetConsumer(this); + aPDU->SetResultHandler(aRes); + aPDU->UpdateHeader(); + mConnection->SendSocketData(aPDU); // Forward PDU to command channel return NS_OK;