-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
How to avoid TIME_WAIT after TCP request? #1285
Labels
Comments
You code is fine does not leaks sockets and
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm facing an issue that I don't know how to solve. I have tried different versions: libevent 2.1.11 and newer. Tested on Windows Server 2008, Windows 7 and Windows 10.
If I send a TCP request to the server, then I will get the TIME_WAIT state on the server. If an attacker sends too many TCP requests, new connections may stop being created. TIME_WAIT also occurs if I execute the following code (for example, if I don't want to respond to HTTP request and just want to free up resources):
evhttp_connection_free(evhttp_request_get_connection(req));
Am I doing something wrong or is it a bug? How can TIME_WAIT be avoided?
Below is an example to reproduce. http-server.c in samples with minor changes for Windows also reproduces this.
The text was updated successfully, but these errors were encountered: