Made the code look pretty

This commit is contained in:
Zi Xing 2021-12-11 14:08:36 -05:00
parent 96f36d1306
commit 72661cb6fb
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@
$count = 0;
$timeout_seconds = 3;
$got_lock = true;
while(!flock($this->SystemLockResource, LOCK_EX | LOCK_NB, $would_block))
{
if($would_block && $count++ < $timeout_seconds)
@ -57,6 +58,7 @@
break;
}
}
if($got_lock == false)
{
fclose($this->SystemLockResource);