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
Timeout argument causes problems in sf::TcpSocket::connect() #1346
Comments
Not the same, but similarly trying to reuse a socket, it seems there's an oversight in actually closing the closing the socket before trying to establish a new one. Since the original poster of the thread didn't end up creating an issue, I'll just take this one then. For further posting, keep in mind though that we prefer to first discuss issues on the forum, as it often turns out to be misconfigurations or general user errors and we like to keep the issue track for confirmed problems. |
@LaurentGomila Do you think, simply adding |
"Reusing sockets" is something that should be carefully reviewed in the whole network module, I see that similar functions ( |
…ng listen or connect while the underlying socket object already exists, also adjusted UdpSocket to be consistent with connect and listen behaviour when calling bind while the underlying socket object already exists. Fixes #1346
@Quent42340 Try out PR #1408. |
…ng listen or connect while the underlying socket object already exists, also adjusted UdpSocket to be consistent with connect and listen behaviour when calling bind while the underlying socket object already exists. Fixes #1346
I tried using sf::TcpSocket recently, and I decided to use the
timeout
argument.When I set it to, let's say
sf::seconds(5)
, and if it fails to connect once, the instance of the socket will no longer try to connect, and always fail.So is this behavior intended or did you just forget to reset timeout state after a connection failed?
Library: SFML 2.4.2-4
OS: ArchLinux x86_64
The text was updated successfully, but these errors were encountered: