[Vortex] async connect issue on linux 2.4

Martin Huter m.huter at phion.com
Mon Oct 20 11:57:02 CEST 2008


hi.

found an issue in asyncronous connecting in __vortex_connection_new:
i couldn't figure out why, but it seems that - at least on linux 2.4 and older 
glibc versions - the select/poll after a non-blocking connect may (in very 
rare cases!) result a value >0 though the connection wasn't established at 
all.
i think it has something to do with the arp handling in the kernel, but i'm 
not sure.
anyway, querying the SO_ERROR option on the socket results an error in this 
case and one can find out that the connection is not established.
appended tiny patch queries that option in the __vortex_connection_new 
function, and it works for me.

cheers
martin huter

-- 
Martin Huter
Unit Manager
phion AG
Eduard-Bodem-Gasse 1
A-6020 Innsbruck

Tel:     +43 (0) 508 100
Fax:     +43 (0) 508 100 20
Mail:    m.huter at phion.com
Web:     http://www.phion.com

phion AG
Vorsitzender des Aufsichtsrates: Dr. Karl  Lamprecht
Vorstand: Dr. Wieland Alge, Mag. Günter Klausner
Sitz der Gesellschaft: 6020 Innsbruck, Österreich
Handelsgericht Innsbruck Firmenbuch: 184392s
UID-Nr:: ATU47509003
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vortex-async-connect.patch
Type: text/x-diff
Size: 1364 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20081020/aeafb178/attachment.patch 


More information about the Vortex mailing list