Retry sync if we go offline

If the application drops connection, it will try to sync every 1.5 seconds until it regains connection.