Avoid problems with getpid on webhosts

This commit is contained in:
Daniil Gentili 2018-03-04 12:00:35 +00:00
parent 6604623188
commit 5e48b82174

View File

@ -70,11 +70,15 @@ class Logger
public static function is_fork()
{
try {
if (self::$pid === null) {
self::$pid = getmypid();
}
return self::$pid !== getmypid();
} catch (\danog\MadelineProto\Exception $e) {
return false;
}
}
/*