Skip to content

Default configuration uploads "Uploaded to remote storage." #10

@VojtaStanek

Description

@VojtaStanek

With removeUploads there is a race condition which can result in file with Uploaded to remote storage. being uploaded.

It's because ExecCurlRequestSender is async by default:

public function __construct(string $curlBinary = 'curl', ?bool $async = null)
{
$this->curlBinary = $curlBinary;
$this->async = $async ?? (PHP_SAPI !== 'cli');
}

And TracyHandler replaces the content immediately.

if ($blueScreen->renderToFile($exception, $localPath)) {
if ($this->remoteStorageDriver !== null) {
$uploaded = $this->remoteStorageDriver->upload($localPath);
if ($uploaded && $this->removeUploads) {
@file_put_contents($localPath, self::UPLOADED_FILE_CONTENTS);
}
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions