[issue10878] asyncore does not react properly on close()

2011-01-10 Thread Teodor Georgiev
Teodor Georgiev lv_tok...@yahoo.com added the comment: Sorry, I forgot to mention - I have already tried to return False, but there was no difference. def readable(self): if time.time() = self.timeout: self.close() return False else: return

[issue10878] asyncore does not react properly on close()

2011-01-10 Thread Teodor Georgiev
Teodor Georgiev lv_tok...@yahoo.com added the comment: Precisely, I traced down the problem by putting a simple breakpoint in asyncore.py: def poll(timeout=0.0, map=None): if map is None: map = socket_map if map: r = []; w = []; e = [] for fd, obj in map.items

[issue10878] asyncore does not react properly on close()

2011-01-09 Thread Teodor Georgiev
New submission from Teodor Georgiev lv_tok...@yahoo.com: I am trying to add a simple timer to each created socket and destroy it once the timer expires: class client(asyncore.dispatcher): def __init__(self,host): ... self.timeout = time.time() + 5 def readable(self