Polaris
Polaris copied to clipboard
Polaris leaves behind a couple of event subscribers
Polaris Bug Report
Description of the bug
After running Stop-Polaris
and Clear-Polaris
, the Polaris module leaves behind a couple of event subscriptions. These should be cleaned up during Clear-Polaris
, I believe.
Steps to reproduce
Steps to reproduce the behavior:
New-PolarisGetRoute -Path / -ScriptBlock { }
Start-Polaris
Stop-Polaris
Clear-Polaris
Now run Get-EventSubscriber
, and there are a couple of registrations active.
SubscriptionId : 2
SourceObject : System.Management.Automation.PowerShell
EventName : InvocationStateChanged
SourceIdentifier : fee5b04f-61a9-4ab3-a68a-1ee1bc9f3508
Action : System.Management.Automation.PSEventJob
HandlerDelegate :
SupportEvent : False
ForwardEvent : False
SubscriptionId : 3
SourceObject : CallbackEventBridge
EventName : callbackcomplete
SourceIdentifier : cc883506-5c5e-48a0-b471-930beca121e1
Action : System.Management.Automation.PSEventJob
HandlerDelegate :
SupportEvent : False
ForwardEvent : False
Expected behavior
No leftover event subscribers are registered in PowerShell.
Version Information
Run the following script and copy and paste the results here:
PSCompatibleVersions | Platform | PSRemotingProtocolVersion | SerializationVersion | WSManStackVersion | PSEdition | PSVersion | OS | GitCommitId |
---|---|---|---|---|---|---|---|---|
1.0.-1.-1, 2.0.-1.-1, 3.0.-1.-1, 4.0.-1.-1, 5.0.-1.-1, 5.1.10032.0, 6.0.0.-1, 6.1.0.-1, 6.2.0.-1, 7.0.0.-1, 7.1.0.-1 | Win32NT | 2.3 | 1.1.0.1 | 3.0 | Core | 7.1.0 | Microsoft Windows 10.0.19041 | 7.1.0 |