bugfix
This commit is contained in:
parent
1717c7676a
commit
d4ca6c7fa0
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit 916411226dd921657305ee7c344c870f6800f479
|
||||
Subproject commit 3a5b18f742fa7f2898562aa3e9d7d20a2634bf69
|
@ -71,19 +71,23 @@ class Serialization
|
||||
\danog\MadelineProto\Logger::log('Lock acquired, serializing');
|
||||
|
||||
try {
|
||||
$update_closure = $instance->API->settings['updates']['callback'];
|
||||
if ($instance->API->settings['updates']['callback'] instanceof \Closure) {
|
||||
$instance->API->settings['updates']['callback'] = [$instance->API, 'noop'];
|
||||
}
|
||||
$logger_closure = $instance->API->settings['logger']['logger_param'];
|
||||
if ($instance->API->settings['logger']['logger_param'] instanceof \Closure) {
|
||||
$instance->API->settings['logger']['logger_param'] = [$instance->API, 'noop'];
|
||||
if (!$instance->getting_api_id) {
|
||||
$update_closure = $instance->API->settings['updates']['callback'];
|
||||
if ($instance->API->settings['updates']['callback'] instanceof \Closure) {
|
||||
$instance->API->settings['updates']['callback'] = [$instance->API, 'noop'];
|
||||
}
|
||||
$logger_closure = $instance->API->settings['logger']['logger_param'];
|
||||
if ($instance->API->settings['logger']['logger_param'] instanceof \Closure) {
|
||||
$instance->API->settings['logger']['logger_param'] = [$instance->API, 'noop'];
|
||||
}
|
||||
}
|
||||
$wrote = file_put_contents($realpaths['tempfile'], serialize($instance));
|
||||
rename($realpaths['tempfile'], $realpaths['file']);
|
||||
} finally {
|
||||
$instance->API->settings['updates']['callback'] = $update_closure;
|
||||
$instance->API->settings['logger']['logger_param'] = $logger_closure;
|
||||
if (!$instance->getting_api_id) {
|
||||
$instance->API->settings['updates']['callback'] = $update_closure;
|
||||
$instance->API->settings['logger']['logger_param'] = $logger_closure;
|
||||
}
|
||||
flock($realpaths['lockfile'], LOCK_UN);
|
||||
fclose($realpaths['lockfile']);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user