Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb9a9c8

Browse files
committed
Merged revisions 88581 via svnmerge from
svn+ssh://[email protected]/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) ........
1 parent 29eb90a commit fb9a9c8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/library/asyncore.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ implement its socket handling::
309309
asyncore Example basic echo server
310310
----------------------------------
311311

312-
Here is abasic echo server that uses the :class:`dispatcher` class to accept
312+
Here is a basic echo server that uses the :class:`dispatcher` class to accept
313313
connections and dispatches the incoming connections to a handler::
314314

315315
import asyncore
@@ -319,7 +319,8 @@ connections and dispatches the incoming connections to a handler::
319319

320320
def handle_read(self):
321321
data = self.recv(8192)
322-
self.send(data)
322+
if data:
323+
self.send(data)
323324

324325
class EchoServer(asyncore.dispatcher):
325326

0 commit comments

Comments
 (0)