Progress on issue #1193577 by adding a polling .shutdown() method to
SocketServers. The core of the patch was written by Pedro Werneck, but any bugs
are mine. I've also rearranged the code for timeouts in order to avoid
interfering with the shutdown poll.
diff --git a/Misc/NEWS b/Misc/NEWS
index 7e059b3..e3a3cb2 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -18,6 +18,9 @@
 Library
 -------
 
+- Issue #1193577: A .shutdown() method has been added to SocketServers
+  which terminates the .serve_forever() loop.
+
 - Bug #2220: handle rlcompleter attribute match failure more gracefully.
 
 - Issue #2225: py_compile, when executed as a script, now returns a non-