<div dir="ltr">After a network outage, a long-running telnetd was spinning trying to<br>read from a socket that was in TIME_WAIT. It's easy to reproduce this by<br>using the regular telnet client and typing ^]^D to exit abruptly.<br><br>I don't think these sockets should ever have been non-blocking, and we<br>want to give up on the client if we hit EOF. All of this needs<br>rewriting to be less complicated (and not use select(2)), but this seems<br>to be a minimal fix for the spin without harming normal usage (where by<br>"usage" I mean "testing the telnet client").<br>---<br> toys/pending/telnetd.c | 22 ++++++++++++----------<br> 1 file changed, 12 insertions(+), 10 deletions(-)<br></div>