[Vortex] async connect issue on linux 2.4

Francis Brosnan Blazquez francis at aspl.es
Mon Oct 20 15:47:26 CEST 2008


> hi.

Hi Martin,

> 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.

Assuming the error happens when the err returned by
vortex_io_waiting_invoke_wait is greater than 0 (that is, it is
signaling connection complete), I've updated your patch to check the
error condition only on that branch. I've attached it. 

Let me know your opinion and if this patch also solves your issue. 

Thanks Martin!

> cheers
> martin huter
> 
> _______________________________________________
> Vortex mailing list
> Vortex at lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/vortex
-- 
Francis Brosnan Blazquez <francis at aspl.es>
Advanced Software Production Line, S.L.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vortex-async-connect.patch
Type: text/x-patch
Size: 1794 bytes
Desc: not available
Url : http://lists.aspl.es/pipermail/vortex/attachments/20081020/4fbb8b99/attachment.bin 


More information about the Vortex mailing list