Hi !

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() ?

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 

Reply via email to