[reSIProcate] About Helper::aBitSmallerThan and ClientSubscription failing to reSUBSCRIBE
Hi,
I'm running into an issue where a client subscription does not end up
sending a reSUBSCRIBE after a while.
I was able to zoom in on ClientSubscription::processNextNotify() where
we calculate the value of the UInt32 expires variable. What happens in
my case is that
qn->notify().header(h_SubscriptionState).param(p_expires) is equal to
5, which means that Helper::aBitSmallerThan returns 0.
Since UInt32 expires is thus set to 0, then the reSUBSCRIBE timer
isn't fired near ClientSubscription.cxx:366.
The comment in Helper::aBitSmallerThan says:
/**
Used by Registration, Publication and Subscription refreshes, to
calculate the time at which a refresh should be performed (which
is some time, that is a bit smaller than the Expiration interval).
The recommended calculation from the RFC's is the minimnum of the
Exipiration interval less 5 seconds and nine tenths of the exipiration
interval.
*/
In this case, 5 - 5 = 0. Should Helper::aBitSmallerThan(5) really
return 0 or should we interpret UInt32 expires = 0 as "send the
refresh now" rather than "send the refresh in X seconds"?
Thanks,
Francis