Fix: Unable to establish connection on channel when hot restart (#142)

* Fix: Unable to establish connection on channel when hot restart

* Update Changelog
This commit is contained in:
Rohit Sangwan
2025-02-21 19:27:54 +05:30
committed by GitHub
parent 6cc43ccc86
commit bc19a653dd
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -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`
+5 -1
View File
@@ -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.