mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:19:00 +01:00
Avoid race conditions
This commit is contained in:
parent
209c699ef5
commit
12f4e7dbf4
@ -52,7 +52,7 @@ function ___install_madeline()
|
||||
$contents = \file_get_contents($file);
|
||||
|
||||
if (\strpos($contents, 'new \danog\MadelineProto\Server') && \in_array($contents, [@\file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/2270bd9a94d168a5e6731ffd7e61821ea244beff/mtproxyd'), @\file_get_contents('https://github.com/danog/MadelineProtoPhar/raw/7cabb718ec3ccb79e3c8e3d34f5bccbe3f63b0fd/mtproxyd')]) && ($mtproxyd = @\file_get_contents('https://phar.madelineproto.xyz/mtproxyd?v=new'))) {
|
||||
\file_put_contents($file, $mtproxyd);
|
||||
\file_put_contents($file, $mtproxyd, LOCK_EX);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -121,8 +121,8 @@ function ___install_madeline()
|
||||
}
|
||||
$previous['danog/madelineproto'] = 'old';
|
||||
|
||||
\file_put_contents($madeline_phar, $phar);
|
||||
\file_put_contents("$madeline_phar.version", $release);
|
||||
\file_put_contents($madeline_phar, $phar, LOCK_EX);
|
||||
\file_put_contents("$madeline_phar.version", $release, LOCK_EX);
|
||||
|
||||
$current = $extractVersions();
|
||||
$postData = ['downloads' => []];
|
||||
|
Loading…
Reference in New Issue
Block a user