Skip to content

Running your source code reveals that StopAllProcess() is called multiple times, but Command?.Cancel() throws a null reference exception. #126

@LISALASUGER

Description

@LISALASUGER

StopAllProcess()

Running your source code reveals that StopAllProcess() is called multiple times, but Command?.Cancel() throws a null reference exception.

fix advice:
public void StopAllProcess()
{
stopProcess = true;
if (Command != null)
{
try
{
Command.Cancel();
}
catch
{
// Ignore any errors in cleanup
}
}
timerReport?.Stop();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions