From: Zach Prezkuta Date: Fri, 6 Jul 2012 01:08:30 +0000 (-0600) Subject: slightly better way of handling last loop X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=528d250ded1450e7093f27580cd68c0187348c10;p=friendica.git slightly better way of handling last loop --- diff --git a/include/diaspora.php b/include/diaspora.php index 35cd660596..7551ea9b3a 100755 --- a/include/diaspora.php +++ b/include/diaspora.php @@ -161,7 +161,9 @@ function find_diaspora_person_by_handle($handle) { // whether the function is locked or not. Maybe the locking thread // has died or something. At any rate, a duplicate in 'fcontact' // is a much smaller problem than a deadlocked thread - $got_lock = (($endlessloop + 1) < $maxloops ? lock_function('find_diaspora_person_by_handle', false) : true ); + $got_lock = lock_function('find_diaspora_person_by_handle', false); + if(($endlessloop + 1) >= $maxloops) + $got_lock = true; if($got_lock) { logger('find_diaspora_person_by_handle: create or refresh', LOGGER_DEBUG);