vinitshahdeo/PortScanner

[BUG] Duplicate generated ports causing infinite loop

オープン

#70 opened on 2020/08/17

 (3 件のコメント) (0 件のリアクション) (2 人の担当者)Python (122 件のフォーク)auto 404
CH20bugeasyhacktoberfest

Repository metrics

Stars
 (150 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Describe the bug

The random ports generated in /server/utils/randomNum.js will have to pass duplicate port numbers to /server/index.js when high - low < countofPorts. This renders index.js file to enter infinite loop.

To Reproduce

Steps to reproduce the behavior:

  1. Go to /
  2. Edit config.json for range.high-range.low < count .
  3. Open terminal and run npm start
  4. See error (infinite loop)

Expected behavior

If the provided range is less than countofPorts, show error and display a message.

コントリビューターガイド