Restart advertising if client gets disconnected
This commit is contained in:
parent
065376e06d
commit
db5d59bb2f
@ -211,6 +211,11 @@ void Core::onBluetoothServerRunningChanged(bool running)
|
||||
void Core::onBluetoothServerConnectedChanged(bool connected)
|
||||
{
|
||||
qCDebug(dcApplication()) << "Bluetooth client" << (connected ? "connected" : "disconnected");
|
||||
if (!connected) {
|
||||
// Restart bluetooth server if a client disconnected
|
||||
m_bluetoothServer->stop();
|
||||
m_bluetoothServer->start(m_networkManager->wirelessNetworkDevices().first());
|
||||
}
|
||||
}
|
||||
|
||||
void Core::onNetworkManagerAvailableChanged(const bool &available)
|
||||
|
||||
Reference in New Issue
Block a user