diff options
author | Giampaolo RodolĂ <g.rodola@gmail.com> | 2011-02-25 14:50:57 +0000 |
---|---|---|
committer | Giampaolo RodolĂ <g.rodola@gmail.com> | 2011-02-25 14:50:57 +0000 |
commit | 61a0bf58643c02df01b26d0d29347f6626888e47 (patch) | |
tree | f54025b3ca0298e098dbda6313583472e33651e7 /Doc/library/asyncore.rst | |
parent | c9c2c8b034ee9fb61ee8487545e9711ac2bbcf61 (diff) | |
download | cpython-git-61a0bf58643c02df01b26d0d29347f6626888e47.tar.gz |
(issue 11232) - fix asyncore documentation issue (patch by Sandro Tosi)
Diffstat (limited to 'Doc/library/asyncore.rst')
-rw-r--r-- | Doc/library/asyncore.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/library/asyncore.rst b/Doc/library/asyncore.rst index b168ca7188..54dd249ca7 100644 --- a/Doc/library/asyncore.rst +++ b/Doc/library/asyncore.rst @@ -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): |