On Mon, Dec 3, 2012 at 5:30 AM, Emmanuel Lécharny <firstname.lastname@example.org>
I wonder why we do something like :
private void doSyncSearch( SynchronizationModeEnum syncType, boolean
reloadHint ) throws Exception
SearchFuture sf = connection.searchAsync( searchRequest );
while ( !( resp instanceof SearchResultDone ) && !sf.isCancelled()
&& !disconnected )
if ( resultCode == ResultCodeEnum.E_SYNC_REFRESH_REQUIRED )
doSyncSearch( syncType, true );
I understand that if we get a E_SYNC_REFRESH_REQUIRED result, then we
must void the cookie, delete all the entries we locally have under the
baseDN and redo a sync search, but here, we are at risk of calling the
method over and over...
Can't we use an encapsulating while() ?
you mean using the existing while() loop for handling the E_SYNC_REFRESH_REQUIRED ?
there won't be an infinite loop unless server keep sending the E_SYNC_REFRESH_REQUIRED error
on each try.