diff options
author | friendica <info@friendica.com> | 2012-07-05 18:10:32 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-07-05 18:10:32 -0700 |
commit | 854abcf61290e14acb148e719ff05e5460e79874 (patch) | |
tree | 904cbddec51cc7c21cb5ca7a6531b357e207c59a /include | |
parent | 09959b1b1c828b5b43130f06c9599218fd86b68a (diff) | |
parent | 528d250ded1450e7093f27580cd68c0187348c10 (diff) | |
download | volse-hubzilla-854abcf61290e14acb148e719ff05e5460e79874.tar.gz volse-hubzilla-854abcf61290e14acb148e719ff05e5460e79874.tar.bz2 volse-hubzilla-854abcf61290e14acb148e719ff05e5460e79874.zip |
Merge pull request #376 from fermionic/diaspora-prevent-fcontact-race-conditions
slightly better way of handling last loop
Diffstat (limited to 'include')
-rwxr-xr-x | include/diaspora.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/diaspora.php b/include/diaspora.php index 35cd66059..7551ea9b3 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); |