Giampaolo Rodola' g.rod...@gmail.com added the comment:
No problem.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13928
___
___
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:
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
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
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
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.
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