At Mon, 03 Sep 2012 22:41:24 +0800,
Liu Yuan wrote:
> 
> On 09/03/2012 10:07 PM, MORITA Kazutaka wrote:
> > It waits for a response from the unreachable node at poll() in
> > wait_forward_request().  I'm not sure why it returns after keepalive
> > timeout...
> 
> I met this problem too. But it is quite rare, and I think need to look at how 
> poll
> works inside kernel to give the fix. Because I have test keepalive with poll, 
> keepalive
> does take effect on my tests. I guess at some corner cases of poll, keepalive 
> don't take effect.

Another approach:
 - set poll timeout, SO_SNDTIMEO, and SO_RCVTIMEO as we did before,
   but return SD_RES_NETWORK_ERROR only if epoch is incremented after
   timeout.
 - call connect/2 with nonblocking, and wait for connect completion
   with poll to avoid a connect timeout problem.

This may be easier than digging into kernel code.

Thanks,

Kazutaka
-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to