1
0
mirror of https://github.com/danog/amp.git synced 2024-11-26 20:15:00 +01:00

Recreate watcher if it has been triggered

This commit is contained in:
Niklas Keller 2017-12-07 19:23:25 +01:00
parent 79039cddcb
commit dd303dbc90

View File

@ -42,6 +42,10 @@ final class Coroutine implements Promise {
public function __construct(\Generator $generator) {
$this->generator = $generator;
$this->timeoutWatcher = Loop::delay(1000, function () {
$this->timeoutWatcher = Loop::delay(1000, function () {
fwrite(STDERR, $this->trace . "\r\n");
});
fwrite(STDERR, $this->trace . "\r\n");
});
$this->trace = formatStacktrace(\debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS));