PhotoBackup / client-android

The Android PhotoBackup client, made to free your pictures from your device
https://photobackup.github.io/
GNU General Public License v2.0
48 stars 15 forks source link

Increased Timeout from default 10 -> 30 #30

Closed zealot128 closed 8 years ago

zealot128 commented 8 years ago

The default OKhttp client timeout for read/write/connect is each 10seconds. I've increased it to 30s each.

In my current place the internet is a little flaky sometimes, so some uploads fail occasionally.

I am not sure, if the write timeout should be even higher than that, like several minutes for making sure the files get uploaded properly.

e.g. https://github.com/square/retrofit/issues/1447

stephanepechard commented 8 years ago

Good idea, thanks for it. This is a matter that probably be back on the table when videos will be handle by PB (there's an issue for this). The pity is that servers do not handle upload resuming easily... Have to think a bit around this.

stephanepechard commented 8 years ago

I lazyloaded the client you created though, no need to instantiate it in the onCreate().