How to reuse TCP listening socket immediately after it was connected at least once?
ldo at geek-central.gen.new_zealand
Sun May 31 04:00:22 EDT 2009
In message <gvqh4p$obn$1 at news.lysator.liu.se>, Thomas Bellman wrote:
> We weren't exactly keen on rebooting the machine, but it was the
> fastest way of getting out of that situation that we could figure
> out. How *should* we have dealt with it in your opinion?
Remember, the timed_wait timeout is there for a reason, and trying to defeat
it could reduce the reliability of your application--that's why cutting
corners is a bad idea.
If you want to minimize the effect of the timeout, then just use different
ports, and have the clients find them via DNS SRV records.
More information about the Python-list