Skip to content

Commit

Permalink
Fix: error from EIO
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Apr 23, 2023
1 parent 537299b commit fdd7631
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/AsyncTools.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
use function Amp\ByteStream\getStdout;
use function Amp\delay;
use function Amp\File\exists;
use function Amp\File\touch as touchAsync;
use function Amp\Future\await;

use function Amp\Future\awaitAny;
Expand Down Expand Up @@ -262,7 +261,7 @@ public static function after(Generator|Future $a, Generator|Future $b): Future
public static function flock(string $file, int $operation, float $polling = 0.1, ?Cancellation $token = null, ?Closure $failureCb = null): ?Closure
{
if (!exists($file)) {
touchAsync($file);
\touch($file);
}
$operation |= LOCK_NB;
$res = \fopen($file, 'c');
Expand Down

0 comments on commit fdd7631

Please sign in to comment.