diff --git a/internal/platform/implementation/windows/bluetooth_classic_medium.cc b/internal/platform/implementation/windows/bluetooth_classic_medium.cc index 0af1803f..927b77b3 100644 --- a/internal/platform/implementation/windows/bluetooth_classic_medium.cc +++ b/internal/platform/implementation/windows/bluetooth_classic_medium.cc @@ -937,15 +937,17 @@ bool BluetoothClassicMedium::StopAdvertising() { } catch (std::exception exception) { LOG(ERROR) << __func__ << ": StopAdvertising exception: " << exception.what(); - return false; } catch (const winrt::hresult_error& ex) { LOG(ERROR) << __func__ << ": StopAdvertising exception: " << ex.code() << ": " << winrt::to_string(ex.message()); - return false; } catch (...) { LOG(ERROR) << __func__ << ": Unknown exception."; - return false; } + + rfcomm_provider_ = nullptr; + raw_server_socket_ = nullptr; + server_socket_ = nullptr; + return false; } bool BluetoothClassicMedium::InitializeServiceSdpAttributes(