Closed GlassBeaver closed 4 years ago
I've observed this basically since I started working on it. I just tried reproducing it with the server.cpp
/client.cpp
examples. It resulted in this error about 2 out of 5 times I've ran it. Note that I didn't do a clean close here, but instead Ctrl-C'd the process.
With the transmission_client/_server
examples, where the server actually closes the socket, I haven't been able to reproduce it. This is all on kernel 5.5.8.
I'm also not sure what is the reason for it. Given that libsocket is a relatively thin layer on top of standard syscalls, it must be something related to the TCP timing that you mentioned already. The parameters you posted definitely seem to improve the situation.
Thanks for taking a look - I'll close the ticket and update my servers to the latest kernels.
Hi, first thank you for the excellent libsocket library.
I have a problem similar to #61 in that TCP listen sockets on a server are kept in a TIME_WAIT state by linux (centos 7) for approximately 30 seconds. I've read #61 and tried the following but it didn't help:
I think I'm closing the listen stream & socket correctly:
Do you have any advice on how to combat this?