[issue13928] bug in asyncore.dispatcher_with_send

2012-02-06 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: No problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13928 ___ ___

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread adamhj
adamhj ada...@gmail.com added the comment: A non connected socket must be writable in order to connect. i can't understand this, does it means that one may use self.connect() in handle_write()? and in fact i found something seems opposite on this page:

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: i can't understand this, does it means that one may use self.connect() in handle_write()? Nope. When handle_write() is called you are supposed to be *already* connected, hence there's no point in calling connect() again. This is

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread adamhj
adamhj ada...@gmail.com added the comment: here is a script emulating what is happened in dispatcher class when the second bug triggered. you can use either a non-exist host/port, or a high delay remote port as target(see the comments in the script) and you may use a sniffer(tcpdump/wireshark

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-04 Thread adamhj
adamhj ada...@gmail.com added the comment: ah just ignore my previous msg as i post it without seeing yours. Nope. It means that *before* showing up the socket was *not* connected. ok, i read more in the asyncore source and finally understand what do you mean by A non connected socket must be

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-03 Thread Giampaolo Rodola'
Giampaolo Rodola' g.rod...@gmail.com added the comment: why is a not connected connection writable? A non connected socket must be writable in order to connect. if we call dispatcher.connect() immediately after .connect(), socket error 10057 may be raised, Not sure what you mean here.

[issue13928] bug in asyncore.dispatcher_with_send

2012-02-02 Thread adamhj
New submission from adamhj ada...@gmail.com: i found 2 relative bugs in asyncore.dispatcher_with_send class: one is in the asyncore.dispatcher_with_send.writable(): def writable(self): return (not self.connected) or len(self.out_buffer) why is a not connected connection writable? i