mobizt / Firebase-ESP32

[DEPRECATED]🔥 Firebase RTDB Arduino Library for ESP32. The complete, fast, secured and reliable Firebase Arduino client library that supports CRUD (create, read, update, delete) and Stream operations.
MIT License
415 stars 118 forks source link

Stream cannot recover after internet restore #108

Closed chauzov1995 closed 3 years ago

chauzov1995 commented 3 years ago

We simulate the situation: esp32 is connected to wi-fi, wi-fi has Internet access. We turn off the Internet on the router, then turn the Internet back on in a minute. The stream could not recover. There will be all the time - Stream timeout, resume streaming ... Add a function to check if the stream is alive.

mobizt commented 3 years ago

This is done internally and heavily discussion on this many times.

mobizt commented 3 years ago

This is your internet connection issue.

Nothing to add for that but you can check the bool returned from httpConnected() method of Firebase Data object that you use for stream.

The httpConnected() will be true when stream connection is alive as the stream is connected (not the WiFi or internet status).

mobizt commented 3 years ago

You can use streamTimeout() method of Firebase Data object that used for stream to check the stream connection too.

That's the method used in the stream examples (not a stream callback), please check.