0

I am loading images in my listview from Server. All the images are .png and the size is quite less so that it can be easily shown like a thum image in a listview. But every time I am getting java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer).LogCat is showing the following exception :-

09-04 14:16:43.402: W/System.err(27413): java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
09-04 14:16:43.403: W/System.err(27413):    at libcore.io.IoBridge.maybeThrowAfterRecvfrom(IoBridge.java:592)
09-04 14:16:43.403: W/System.err(27413):    at libcore.io.IoBridge.recvfrom(IoBridge.java:556)
09-04 14:16:43.403: W/System.err(27413):    at java.net.PlainSocketImpl.read(PlainSocketImpl.java:485)
09-04 14:16:43.403: W/System.err(27413):    at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
09-04 14:16:43.403: W/System.err(27413):    at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okio.Okio$2.read(Okio.java:113)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okio.RealBufferedSource.indexOf(RealBufferedSource.java:147)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:94)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okhttp.internal.http.HttpConnection.readResponse(HttpConnection.java:175)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okhttp.internal.http.HttpTransport.readResponseHeaders(HttpTransport.java:101)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:616)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:379)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
09-04 14:16:43.403: W/System.err(27413):    at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:190)
09-04 14:16:43.403: W/System.err(27413):    at com.suvidhaa.AsyncImage.ImageLoader.getBitmap(ImageLoader.java:76)
09-04 14:16:43.403: W/System.err(27413):    at com.suvidhaa.AsyncImage.ImageLoader.access$0(ImageLoader.java:59)
09-04 14:16:43.403: W/System.err(27413):    at com.suvidhaa.AsyncImage.ImageLoader$PhotosLoader.run(ImageLoader.java:139)
09-04 14:16:43.404: W/System.err(27413):    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422)
09-04 14:16:43.404: W/System.err(27413):    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
09-04 14:16:43.404: W/System.err(27413):    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
09-04 14:16:43.404: W/System.err(27413):    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
09-04 14:16:43.404: W/System.err(27413):    at java.lang.Thread.run(Thread.java:818)
09-04 14:16:43.404: W/System.err(27413): Caused by: android.system.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)
09-04 14:16:43.404: W/System.err(27413):    at libcore.io.Posix.recvfromBytes(Native Method)
09-04 14:16:43.404: W/System.err(27413):    at libcore.io.Posix.recvfrom(Posix.java:161)
09-04 14:16:43.404: W/System.err(27413):    at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:250)
09-04 14:16:43.404: W/System.err(27413):    at libcore.io.IoBridge.recvfrom(IoBridge.java:553)
09-04 14:16:43.404: W/System.err(27413):    ... 20 more

I have also tried to load the images by using Picasso library but still facing the same issue. I can' understand what's going on.

Kindly help me regarding the same, any help would be appreciable.

Thanks

Salman Khan
  • 2,822
  • 5
  • 32
  • 53

0 Answers0