Skip to content

Commit

Permalink
Clear timeout conditions if script is stop
Browse files Browse the repository at this point in the history
  • Loading branch information
markdwags committed Apr 6, 2023
1 parent 6540cb2 commit 6644a46
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Razor/Scripts/Engine/Interpreter.cs
Expand Up @@ -1511,6 +1511,17 @@ public static void StopScript()
_activeScript = null;
_currentScope = _scope;
_executionState = ExecutionState.RUNNING;

if (_timeoutCallback != null)
{
if (_timeoutCallback())
{
ClearTimeout();
}

_timeoutCallback = null;
}

OnStop?.Invoke();
}

Expand Down
5 changes: 3 additions & 2 deletions help/docs/releasenotes.md
Expand Up @@ -8,9 +8,10 @@ Below is a list of the latest releases notes going back to the first release of

## 1.10.X (Dev Version)

You can always find the latest dev preview [here](https://github.com/markdwags/Razor/releases/tag/Razor-dev-preview).
* You can always find the latest dev preview [here](https://github.com/markdwags/Razor/releases/tag/Razor-dev-preview).
* Fixed issue with `setvar` not giving you a target cursor if you stopped the script before selecting a target.

* Changed `setlasttarget` to require you provide a serial or variable as parameter. See [docs](guide/commands.md#list-commands).
* Changed `setlasttarget` to require you provide a serial or variable as parameter. See [docs](guide/commands.md#setlasttarget).

## 1.9.77.0 (03/23/2023)

Expand Down

0 comments on commit 6644a46

Please sign in to comment.