The Story
I am using Firebase Storage to upload and download files. The upload works almost perfectly and if the device looses internet connection for a few minutes, then the upload stops, but it automatically resumes once the connection is back.
The Problem
I was expecting this exact same behaviour for the downloads as well. But it doesn't work like that. If my device looses internet connection, the downloads fails abruptly and doesn't automatically once the connection is back after a few seconds.
Is this the normal behaviour or am I missing something?
EDIT
This is the error,
com.google.firebase.storage.StorageException: An unknown error occurred, please check the HTTP result code and inner exception for server response.
Read error: ssl=0xb7e7a510: I/O error during system call, Connection timed out
javax.net.ssl.SSLException: Read error: ssl=0xb7e7a510: I/O error during system call, Connection timed out
at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:699)
at com.android.okio.Okio$2.read(Okio.java:113)
at com.android.okio.RealBufferedSource.read(RealBufferedSource.java:48)
at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:446)
at com.android.okio.RealBufferedSource$1.read(RealBufferedSource.java:168)
at java.io.InputStream.read(InputStream.java:162)
at com.google.firebase.storage.FileDownloadTask.run(Unknown Source)
at com.google.firebase.storage.StorageTask$5.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)