Skip to content

Commit

Permalink
Timeout resumation is based on last session and not begining of session
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersai committed Jan 20, 2024
1 parent 5c202f2 commit fc0d1c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Ussd.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,13 @@ public function run(): mixed
[$message, $terminating] = $this->bail($exception);
}

if ($terminating && ContinuingMode::START !== $this->continuingMode) {
if (ContinuingMode::START !== $this->continuingMode) {
/** @var Record */ $record = App::make(Record::class);
$record->forget(static::SPUR, true);
if ($terminating) {
$record->forget(static::SPUR, true);
} elseif ($spur = $record->get(static::SPUR, public: true)) {
$record->set(static::SPUR, $spur, $this->continuingTtl, true);
}
}

return $this->response instanceof Response
Expand Down

0 comments on commit fc0d1c1

Please sign in to comment.