read, write, error = select.select(sockets, sockets, sockets, 60.0)
What is recommended if something ends up in the error list?
read, write, error = select.select(sockets, sockets, sockets, 60.0)
What is recommended if something ends up in the error list?
On the operating systems I know, there's nothing you can do with the sockets suffering "exceptional conditions", except trying to close them (which may raise an exception, so be sure to use a try
/except
around the attempt). You know that the connections those sockets stood for have terminated abnormally, and may want to write some log information about that, show the problem to the user, or the like. In some situations, it may be appropriate to try to establish those connections again (this may of course fail, depending on what exceptional condition was encountered, so be prepared for that).