Stop polling the netlify API when offline was detected
stefanjudis opened this issue · 1 comments
stefanjudis commented
Currently the App keeps polling in the predefined interval no matter if the user is online or offline.
The logic could be adjusted a little bit to stop polling the connection object fires an offline event and could start again when the user comes online again.
connection.on('status-changed', conn => {
if (conn.isOnline) {
// start polling again
} else {
// stop polling
}
});
The polling and retry logic can be found here.
stefanjudis commented
Fixed with #10