Polaris Bug Report
After running Stop-Polaris and when try to re-start the (start-Polaris) it will throw an error.
Description of the bug
Stop-Polaris is not stopping web server on whichever port its started with. I get a below when try to run Start-polaris
Exception` calling "Start" with "0" argument(s): "Failed to listen on prefix 'http://localhost:8080/' because it conflicts with an existing registration on the machine." At C:\Users\harikant\Documents\WindowsPowerShell\Modules\Polaris\0.2.0\lib\Polaris.Class.ps1:316 char:9 + $this.Listener.Start() + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : HttpListenerException
A clear and concise description of what the bug is.
Steps to reproduce
Example when you run the below code
New-PolarisGetRoute -Path "/helloworld" -Scriptblock {
$Response.Send('Hello World!')
}
Start-Polaris -Port 8080
And run Stop-Polaris and again try to start-polaris command it thows the above error.
Expected behavior
To be able to stop and start the Polaris server without any errors.
Version Information
PSVersion : 5.1.17134.858
PSEdition : Desktop
PSCompatibleVersions : {1.0, 2.0, 3.0, 4.0...}
BuildVersion : 10.0.17134.858
CLRVersion : 4.0.30319.42000
WSManStackVersion : 3.0
PSRemotingProtocolVersion : 2.3
SerializationVersion : 1.1.0.1
| PSVersion | PSEdition | PSCompatibleVersions | BuildVersion | CLRVersion | WSManStackVersion | PSRemotingProtocolVersion | SerializationVersion |
| 5.1.17134.858 | Desktop | System.Version[] | 10.0.17134.858 | 4.0.30319.42000 | 3.0 | 2.3 | 1.1.0.1 |