BornToBeRoot / BornToBeRoot/PowerShell_IPv4PortScanner

[Feature Request] Catch Exception from calling EndInvoke and recommend/dynamically reducing Threads

未关闭
#5 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement help wanted
主要语言
PowerShell
星标
243
派生
59
PR 合并指标
30 天内没有已合并 PR

描述

This is a feature request to add dynamic Thread reduction when `EndInvoke` function causes any kind of exception. Otherwise, exit early with a message to recommend for the -Threads parameter to be used.

Specifically this error that I ran into because the default 500 threads is too high for my virtual lab:
```
Exception calling "EndInvoke" with "1" argument(s): "Thread failed to start."
At C:\temp\IPv4PortScan.ps1:260 char:13
+ $Job_Result = $Job.Pipe.EndInvoke($Job.Result)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : ThreadStartException

Exception calling "EndInvoke" with "1" argument(s): "Thread is running or terminated; it cannot restart."
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。