On Fri, Jan 25, 2013 at 12:45:10PM +0000, Nicholas Satterly wrote:

> Does anyone have any ideas of how the connection could at least be
> timed out? Keep in mind that the gmetad is multi-threaded so I'm
> pretty sure that rules out the use of SIGALRM.
..,
> How could a 2 second timeout be enforced on this connect()?

You set O_NONBLOCK on the socket before the connect, run select
with a 2 sec timeout on the socket from there if you have a connection
(depending on if select hit the timeout or not and what getsockopt for
SO_ERROR returns) you set the socket back to blocking.

Did you see any failures when the machine went away after the connect?
I can't remember if we timeout while we are reading data from the
scoket.

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to