iot-smart-home-cloud icon indicating copy to clipboard operation
iot-smart-home-cloud copied to clipboard

If reconnect, disconnect event is fired after connect event.

Open dimitrov-adrian opened this issue 5 years ago • 0 comments

https://github.com/GoogleCloudPlatform/iot-smart-home-cloud/blob/e65a1535d909639de37e8bdda81bbb8167eaed96/firebase/functions/device-cloud/online-state.js#L32

Should check also if logEntry.jsonPayload.status.code !== 6 because in this case disconnect event is fired after "real" connect event.

Example scenario if device is restarted.

dimitrov-adrian avatar Jul 21 '19 17:07 dimitrov-adrian