Skip to content

Commit

Permalink
One more cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jun 26, 2024
1 parent 658d7ad commit 579e280
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/InternalDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,9 @@ final public function extractUpdates(array $updates): array
*
* @param string $url URL
*/
final public function fileGetContents(string $url): string
final public function fileGetContents(string $url, ?\Amp\Cancellation $cancellation = null): string
{
return $this->wrapper->getAPI()->fileGetContents($url);
return $this->wrapper->getAPI()->fileGetContents($url, $cancellation ?? $this->wrapper->getRpcDropCancellation());
}
/**
* Asynchronously lock a file
Expand Down
2 changes: 1 addition & 1 deletion src/VoIPController.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ public function accept(?Cancellation $cancellation = null): self
return $this;
} catch (CallAlreadyDeclinedError) {
$this->log(Lang::$current_lang['call_already_declined']);
$this->discard(DiscardReason::HANGUP, cancellation: $cancellation);
$this->discard(DiscardReason::HANGUP);
return $this;
}
$this->call['b'] = $b;
Expand Down

0 comments on commit 579e280

Please sign in to comment.