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

java.net.SocketTimeoutException #44

Open
vivekgandhi11 opened this issue Mar 28, 2014 · 6 comments
Open

java.net.SocketTimeoutException #44

vivekgandhi11 opened this issue Mar 28, 2014 · 6 comments

Comments

@vivekgandhi11
Copy link

Hi,

I get "java.net.SocketTimeoutException" everytime when I make
conn = new HubConnection(address.toString(), this,
new LongPollingTransport()) {

});

Please help me solve this issue.

Thanks in advance.

@vivekgandhi11
Copy link
Author

Hi,

Im developing a simple chat application. The connection to server is successful only at certain times. Most of the times, the response I get is "java.net.SocketTimeoutException: failed to connect to myserver.com (port 80) after 1000ms. Also after successful connection, OnError method is triggered after sometime, with a exception "java.net.SocketTimeoutException". Im using the latest signalA library.

Please help me in solving this issue.

Thanks in advance.

@erizet
Copy link
Owner

erizet commented Mar 31, 2014

Strange. Are you sure you're using version 0.20? This was fixed in version 0.16.

@vivekgandhi11
Copy link
Author

Hi,

I'm using the latest version only. But still I'm getting this "java.net.SocketTimeoutException: failed to connect to myserver.com (port 80) after 1000ms" once in 10 times. And also after successful connection, when the application stays ideal for sometime, I get "java.net.SocketTimeoutException" error.

Can I send you my Chat application source, to check the error.

Please help me in getting this issue solved. It will be very much helpful.

Thanks.

@erizet
Copy link
Owner

erizet commented Mar 31, 2014

Can you debug to see where you get the error? Try to find the row in the signalA code...

@vivekgandhi11
Copy link
Author

Hi,

I debugged by keeping breakpoints. I get that once in 10 times error in OnStateChange event, that it goes like that -> Disconnected -> Negotiating -> Connecting -> Disconnecting -> Disconnected.

Second issue: After a successful connection, after a period of idle time, OnError event is triggered with exception "java.net.SocketTimeoutException".

@shixiongsun
Copy link

httpClient.setMaxRetries(3);

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

3 participants