mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 23:34:44 +01:00
Avoid GC issues
This commit is contained in:
parent
6b4d9e2233
commit
36d5bd8bc4
@ -47,7 +47,7 @@ class MyEventHandler extends SimpleEventHandler
|
||||
public function convertCmd((Incoming&Message&HasAudio)|(Incoming&Message&HasDocument) $message): void
|
||||
{
|
||||
$reply = $message->reply("Conversion in progress...");
|
||||
try {
|
||||
async(function () use ($message, $reply) {
|
||||
$pipe = self::getStreamPipe();
|
||||
$sink = $pipe->getSink();
|
||||
async(
|
||||
@ -62,9 +62,7 @@ class MyEventHandler extends SimpleEventHandler
|
||||
fileName: $message->media->fileName.".ogg",
|
||||
replyToMsgId: $message->id
|
||||
);
|
||||
} finally {
|
||||
$reply->delete();
|
||||
}
|
||||
})->finally($reply->delete(...));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user