JsBergbau / MiTemperature2

Read the values of the Xiaomi Mi Bluetooth Temperature sensor 2 including custom encrypted format.
705 stars 162 forks source link

Bugfix in callback function #119

Closed fwieringen closed 2 years ago

fwieringen commented 2 years ago

Due to the use of invokeCallback boolean instead of continue keyword, the piece of code to determine whether httpcallback was successful (if ret != 0) caused the callbackCounter to be increased as well. This was solved by placing the entire block of code in an if-block instead of just the args.callback and args.httpcallback.

JsBergbau commented 2 years ago

Thanks for fixing.