(issue 11232) - fix asyncore documentation issue (patch by Sandro Tosi)
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst
index b168ca7..54dd249 100644
--- a/Doc/library/asyncore.rst
+++ b/Doc/library/asyncore.rst
@@ -309,7 +309,7 @@
asyncore Example basic echo server
----------------------------------
-Here is abasic echo server that uses the :class:`dispatcher` class to accept
+Here is a basic echo server that uses the :class:`dispatcher` class to accept
connections and dispatches the incoming connections to a handler::
import asyncore
@@ -319,7 +319,8 @@
def handle_read(self):
data = self.recv(8192)
- self.send(data)
+ if data:
+ self.send(data)
class EchoServer(asyncore.dispatcher):