android - Retrofit SocketTimeoutException - Uploading Image -
I am currently using retrofit for Android because when my network communications are posting an image on my backend server, The server is in the middle of upload and then returns "bar out" with SocketTimeoutException.
I've added the OKhttp library because some have suggested and still time is ending.
The current image size is around 750kb, because I deducted them.
Is there any suitable way to change the amount of time until the time for the restroof? Or is there a better way to upload images to a server?
Thanks
Perhaps try changing timeout on your OKHTP client; Note that a setting of 0 sometimes indicates the ending.
Bonus: If you need help finding the appropriate settings, then you can read with the exception before the timeout, and can also check the current default reading with timeout.
Comments
Post a Comment