[sheepdog] [PATCH v4 2/5] sheep: rejoin cluster after a zookeeper session timeout

Kai Zhang kyle at zelin.io
Tue Jun 18 09:56:19 CEST 2013


On Jun 18, 2013, at 3:26 PM, Liu Yuan <namei.unix at gmail.com> wrote:

>> +		while (sd_reconnect_handler()) {
>> +			sd_eprintf("failed to reconnect. sleep and retry...");
>> +			sleep(1);
>> +		}
> 
> Please explain why you need call sd_reconnect_handler() in a loop, in
> what case it will fail?

sd_reconnect_handler() will fail when network crash again before calling zookeeper_init().
So we have to use loop to handle this.

Thanks,
Kyle
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20130618/c134acca/attachment-0004.html>


More information about the sheepdog mailing list