gajim does not catch connection refused errors for link-local xmpp.
Bug description
When I try to send a link-local xmpp message between a win7x64 box (using ipv6 & bonjour) and an ubuntu box (using ipv4 & avahi) the messages are silently lost and no information or errors appear in either the GUI or the log.
After digging around the source for a few hours I figured out that gajim on windows was trying to connect to ubuntu's ipv6 address and ubuntu tries to connect to windows' ipv4 address. Both result in a connection refused error, but the non-blocking sockets are returning EINPROGRESS on connect() (in src/common/zeroconf/client_zeroconf.py). Gajim then sticks them in gobject's io watcher where they are immediately (and silently) closed (in src/common/xmpp/idlequeue.py).
According to this: http://bugs.python.org/issue2944 getsockopt should be used on close to check for errors.
Gajim should probably catch ECONNREFUSED and either inform the user about the error or try the next ip (avahi/bonjour should theoretically give both ipv4 and ipv6 addresses?)
Steps to reproduce
Run gajim on a win7 and ubuntu box and try to use link-local.
Could probably also use 2 machines and a firewall to block the port to get connection refused errors.
Software versions
OS version: win7x64 and (x)ubuntu 11.10
I'm using gajim's .15beta4