vinitshahdeo/PortScanner
[BUG] Duplicate generated ports causing infinite loop
Ouverte
#70 ouverte le 17 août 2020
CH20bugeasyhacktoberfest
Métriques du dépôt
- Stars
- (150 étoiles)
- Métriques de merge PR
- (Métriques PR en attente)
Description
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:
- Go to
/ - Edit
config.jsonfor range.high-range.low < count . - Open terminal and run
npm start - See error (infinite loop)
Expected behavior
If the provided range is less than countofPorts, show error and display a message.