mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-23 02:11:14 +01:00
Make more syscalls async
This commit is contained in:
parent
6b33318f27
commit
a0bd11b142
@ -71,6 +71,7 @@ use Throwable;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
use function Amp\async;
|
||||
use function Amp\File\deleteFile;
|
||||
use function Amp\File\getSize;
|
||||
use function Amp\Future\await;
|
||||
|
||||
@ -1777,7 +1778,7 @@ final class MTProto implements TLCallback, LoggerGetter
|
||||
],
|
||||
],
|
||||
);
|
||||
\unlink($path);
|
||||
deleteFile($path);
|
||||
}
|
||||
}
|
||||
$sent = false;
|
||||
|
@ -851,7 +851,9 @@ trait Files
|
||||
$this->downloadToStream($messageMedia, $stream, $cb, $size, -1);
|
||||
} finally {
|
||||
$unlock();
|
||||
deleteFile("$file.lock");
|
||||
try {
|
||||
deleteFile("$file.lock");
|
||||
} catch (Throwable) {}
|
||||
$stream->close();
|
||||
}
|
||||
return $file;
|
||||
|
Loading…
x
Reference in New Issue
Block a user