]> granicus.if.org Git - python/commitdiff
Merged revisions 88581 via svnmerge from
authorGiampaolo Rodolà <g.rodola@gmail.com>
Fri, 25 Feb 2011 14:55:52 +0000 (14:55 +0000)
committerGiampaolo Rodolà <g.rodola@gmail.com>
Fri, 25 Feb 2011 14:55:52 +0000 (14:55 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r88581 | giampaolo.rodola | 2011-02-25 15:50:57 +0100 (ven, 25 feb 2011) | 1 line

  (issue 11232) - fix asyncore documentation issue (patch by Sandro Tosi)
........

Doc/library/asyncore.rst

index 58691abd4bce9e1b527901b327cbce837b04d5b7..813ac21cf3c8cb4fa6404378c83cb949d69e861e 100644 (file)
@@ -292,7 +292,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
@@ -302,7 +302,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):