Skip to content
This repository has been archived by the owner on Dec 8, 2021. It is now read-only.

Polaris leaves behind a couple of event subscribers #215

Open
pcgeek86 opened this issue Nov 28, 2020 · 0 comments
Open

Polaris leaves behind a couple of event subscribers #215

pcgeek86 opened this issue Nov 28, 2020 · 0 comments

Comments

@pcgeek86
Copy link
Contributor

pcgeek86 commented Nov 28, 2020

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:

PSCompatibleVersionsPlatformPSRemotingProtocolVersionSerializationVersionWSManStackVersionPSEditionPSVersionOSGitCommitId
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.-1Win32NT2.31.1.0.13.0Core7.1.0Microsoft Windows 10.0.190417.1.0
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant