Skip to content

Commit

Permalink
Merge pull request #1338 from danog/fix_new_session
Browse files Browse the repository at this point in the history
Fix: error from EIO
  • Loading branch information
danog authored Apr 23, 2023
2 parents 537299b + fdd7631 commit 9e2e653
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 9e2e653

Please sign in to comment.