diff --git a/CHANGELOG.md b/CHANGELOG.md index 18539c7..c5c17f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.17.0 * Fix Windows crash when calling pair APIs with an unknown deviceId +* Fix Windows warning `Unable to establish connection on channel` when hot restart ## 0.16.0 * BREAKING CHANGE: `payload` is now `payloadPrefix` diff --git a/windows/src/universal_ble_plugin.h b/windows/src/universal_ble_plugin.h index 3295948..da3751a 100644 --- a/windows/src/universal_ble_plugin.h +++ b/windows/src/universal_ble_plugin.h @@ -74,7 +74,11 @@ namespace universal_ble static void SuccessCallback() {} static void ErrorCallback(const FlutterError &error) { - std::cout << "ErrorCallback: " << error.message() << std::endl; + // Ignore ChannelConnection Error, This might occur because of HotReload + if (error.code() != "channel-error") + { + std::cout << "ErrorCode: " << error.code() << " Message: " << error.message() << std::endl; + } } // Disallow copy and assign.