Skip to content

Commit

Permalink
Fix TracingDriver::getInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Jul 24, 2018
1 parent af6fc70 commit d668658
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/Cancellation/TimeoutToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function __construct(int $timeout)
$this->watcher = Loop::delay($timeout, static function () use ($source) {
$source->cancel(new TimeoutException);
});

Loop::unreference($this->watcher);
}

Expand Down
6 changes: 5 additions & 1 deletion lib/Loop/EventDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ public function run(): void
*/
public function stop(): void
{
$this->handle->stop();
// Might be called if a stop() call happens during __destruct (which has an undefined order)
if ($this->handle !== null) {
$this->handle->stop();
}

parent::stop();
}

Expand Down
5 changes: 5 additions & 0 deletions lib/Loop/TracingDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ public function getHandle()
$this->driver->getHandle();
}

public function getInfo(): array
{
return $this->driver->getInfo();
}

public function getDump(): string
{
$dump = "";
Expand Down

0 comments on commit d668658

Please sign in to comment.