On Nov 22, 9:53 am, Tzury Bar Yochay <[EMAIL PROTECTED]> wrote: > The following is a code I am using for a simple tcp echo server. > When I run it and then connect to it (with Telnet for example) if I > shout down the telnet the CPU tops 100% of usage and saty there > forever.... > def handle(self): > while 1: > data = self.request.recv(1024) > self.request.send(data) > if data.strip() == 'bye': > return
I forget exactly how the superclass works, but that while 1 looks suspicious. Try chaning it to data = "dummy" while data: ... -- Aaron Watters === http://www.xfeedme.com/nucular/pydistro.py/go?FREETEXT=help+infinite+loop -- http://mail.python.org/mailman/listinfo/python-list