Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read byte is 0 && java.net.SocketTimeoutException #14

Open
davitz- opened this issue Sep 25, 2015 · 5 comments
Open

read byte is 0 && java.net.SocketTimeoutException #14

davitz- opened this issue Sep 25, 2015 · 5 comments

Comments

@davitz-
Copy link

davitz- commented Sep 25, 2015

I have set up a longer link time, but there is still a problem

[CDS]read byte is 0
java.net.SocketTimeoutException
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:497)
at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:42)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:242)
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.golshadi.majid.core.chunkWorker.AsyncWorker.run(AsyncWorker.java:64)

@davitz- davitz- closed this as completed Sep 25, 2015
@davitz- davitz- reopened this Sep 25, 2015
@davitz- davitz- changed the title java.net.SocketTimeoutException read byte is 0 && java.net.SocketTimeoutException Sep 25, 2015
@majidgolshadi
Copy link
Owner

Would you please describe more?

@taimur97
Copy link

Yes I also saw this exception but I don't know why

@460611929
Copy link

set connection timeout length

@ishuqi
Copy link

ishuqi commented Apr 1, 2016

I have met the SocketTimeoutException too, below is the log
04-01 10:01:27.095: W/System.err(12152): java.net.SocketTimeoutException
04-01 10:01:27.095: W/System.err(12152): at java.net.PlainSocketImpl.read(PlainSocketImpl.java:484)
04-01 10:01:27.095: W/System.err(12152): at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
04-01 10:01:27.095: W/System.err(12152): at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
04-01 10:01:27.095: W/System.err(12152): at com.android.okhttp.okio.Okio$2.read(Okio.java:135)
04-01 10:01:27.095: W/System.err(12152): at com.android.okhttp.okio.AsyncTimeout$2.read(AsyncTimeout.java:211)
04-01 10:01:27.096: W/System.err(12152): at com.android.okhttp.okio.RealBufferedSource.read(RealBufferedSource.java:50)
04-01 10:01:27.096: W/System.err(12152): at com.android.okhttp.internal.http.HttpConnection$FixedLengthSource.read(HttpConnection.java:418)
04-01 10:01:27.096: W/System.err(12152): at com.android.okhttp.okio.RealBufferedSource$1.read(RealBufferedSource.java:349)
04-01 10:01:27.096: W/System.err(12152): at java.io.InputStream.read(InputStream.java:162)
04-01 10:01:27.096: W/System.err(12152): at com.golshadi.majid.core.chunkWorker.AsyncWorker.run(AsyncWorker.java:64)

@lekeCoder
Copy link

edit connection.setConnectTimeout() in AsynWorker.java.

That should resolve that error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants