]> granicus.if.org Git - python/commitdiff
(issue 11232) - fix asyncore documentation issue (patch by Sandro Tosi)
authorGiampaolo Rodolà <g.rodola@gmail.com>
Fri, 25 Feb 2011 14:50:57 +0000 (14:50 +0000)
committerGiampaolo Rodolà <g.rodola@gmail.com>
Fri, 25 Feb 2011 14:50:57 +0000 (14:50 +0000)
Doc/library/asyncore.rst

index b168ca718832f661450836eed4336f18cc9270c8..54dd249ca7f0d432209d8e611e6515319c8fc858 100644 (file)
@@ -309,7 +309,7 @@ implement its socket handling::
 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 @@ connections and dispatches the incoming connections to a handler::
 
         def handle_read(self):
             data = self.recv(8192)
-            self.send(data)
+            if data:
+                self.send(data)
 
     class EchoServer(asyncore.dispatcher):