Logging bugfix
This commit is contained in:
parent
73f5bec68f
commit
e5582beb87
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit 0fcff8e5a31af300511949c4dbafc7be6c0d4dd7
|
||||
Subproject commit 82b301b00560298776ce9ca852e8db71ac21b2e9
|
@ -39,6 +39,9 @@ trait Files
|
||||
$cb = $file;
|
||||
$file = $file->getFile();
|
||||
}
|
||||
|
||||
$t = microtime(true);
|
||||
|
||||
$file = \danog\MadelineProto\Absolute::absolute($file);
|
||||
if (!file_exists($file)) {
|
||||
throw new \danog\MadelineProto\Exception(\danog\MadelineProto\Lang::$current_lang['file_not_exist']);
|
||||
@ -127,17 +130,16 @@ trait Files
|
||||
}
|
||||
|
||||
fclose($f);
|
||||
clearstatcache();
|
||||
|
||||
$this->logger->logger('Speed: '.((filesize($file) * 8) / (microtime(true) - $t) / 1000000));
|
||||
|
||||
return $constructor;
|
||||
}
|
||||
|
||||
public function upload($file, $file_name = '', $cb = null, $encrypted = false, $datacenter = null)
|
||||
{
|
||||
$t = microtime(true);
|
||||
$res = $this->wait(call([$this, 'upload_async'], $file, $file_name, $cb, $encrypted, $datacenter));
|
||||
$this->logger->logger('Speed: '.((filesize($file) * 8) / (microtime(true) - $t) / 1000000));
|
||||
|
||||
return $res;
|
||||
return $this->wait(call([$this, 'upload_async'], $file, $file_name, $cb, $encrypted, $datacenter));
|
||||
}
|
||||
|
||||
public function upload_encrypted($file, $file_name = '', $cb = null)
|
||||
|
Loading…
Reference in New Issue
Block a user