BornToBeRoot / BornToBeRoot/PowerShell_IPv4PortScanner

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

Đang mở
#5 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement help wanted
Ngôn ngữ chính
PowerShell
Star
243
Fork
59
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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."
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.