c# – Temporarily halt app processing loop when computer suspended

My fully async long-running console app intermittently enters a coma after my computer wakes from sleep/hibernation. I’m no expert but it seems like async IO callbacks are getting dropped or something.

Anyway, I’ve given up trying to fix it and instead would like to detect the OS suspend event and cancel my application processing loop, then allow it to restart when the OS resume event occurs.

Is the following code an appropriate use of Monitor/lock?
Are there any obvious race conditions or deadlocks?
What if the resume event proves unreliable and I wanted to resuscitate the app after a nominal timeout?

protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
    var cancelSourceLock = new object();
    CancellationTokenSource cancelSource = null;
    SystemEvents.PowerModeChanged += (_, args) =>
    {
        switch (args.Mode)
        {
            case PowerModes.Suspend:
            {
                Monitor.Enter(cancelSourceLock);
                if (cancelSource != null && !cancelSource.IsCancellationRequested)
                {
                    cancelSource.Cancel();
                }
                break;
            }
            case PowerModes.Resume:
                Monitor.Exit(cancelSourceLock);
                break;
        }
    };
    while (!stoppingToken.IsCancellationRequested)
    {
        lock (cancelSourceLock)
        {
            cancelSource = CancellationTokenSource.CreateLinkedTokenSource(stoppingToken);
        }
        await Execute(cancelSource.Token);
        lock (cancelSourceLock)
        {
            cancelSource.Dispose();
        }
    }
}