Reduce frequency of port scanning
This commit is contained in:
parent
03ad2a17b2
commit
91deaece47
1 changed files with 2 additions and 1 deletions
|
@ -17,7 +17,7 @@ export interface PortScanner {
|
|||
* Will scan local ports and emit events when ports are added or removed.
|
||||
* Currently only scans TCP ports.
|
||||
*/
|
||||
export const createPortScanner = (scanInterval: number = 250): PortScanner => {
|
||||
export const createPortScanner = (scanInterval: number = 5000): PortScanner => {
|
||||
const ports = new Map<number, number>();
|
||||
|
||||
const addEmitter = new Emitter<number[]>();
|
||||
|
@ -76,6 +76,7 @@ export const createPortScanner = (scanInterval: number = 250): PortScanner => {
|
|||
let disposed: boolean = false;
|
||||
|
||||
const doInterval = (): void => {
|
||||
logger.trace("scanning ports");
|
||||
scan((error) => {
|
||||
if (error) {
|
||||
logger.error(`Port scanning will not be available: ${error.message}.`);
|
||||
|
|
Loading…
Reference in a new issue