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

SocketTimeoutException on socket.accept() #6

Open
neslihanturan opened this issue Dec 7, 2016 · 2 comments
Open

SocketTimeoutException on socket.accept() #6

neslihanturan opened this issue Dec 7, 2016 · 2 comments

Comments

@neslihanturan
Copy link

Hi, I just tried this library for a media player application. But I get SocketTimeoutException in ServerProxy.java file, at line 115. The code is on that line is very critical: "Socket client = socket.accept();". It is normal because you set socket timeout to 5 seconds. However, my question is why connection is never established (even if I remove timeout, it waits forever)? Did you experience such case?

@spartacus777
Copy link

+1 same problem

@daneren2005
Copy link
Owner

You can increase the timeout, but you shouldn't be getting a SocketTimeoutException because it is being handled in the loop: https://github.com/daneren2005/ServerProxy/blob/master/src/github/daneren2005/serverproxy/ServerProxy.java#L126. How are you trying to connect to the ServerProxy after you start it? Are you using getPrivateAddress()?

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