mirror of
https://git.tuxpa.in/a/code-server.git
synced 2024-12-27 04:35:25 +00:00
Explicitly mention if netstat isn't installed; downgrade to warning
This commit is contained in:
parent
6361635b55
commit
bbd8b27fc7
@ -79,7 +79,11 @@ export const createPortScanner = (scanInterval: number = 5000): PortScanner => {
|
||||
logger.trace("scanning ports");
|
||||
scan((error) => {
|
||||
if (error) {
|
||||
logger.error(`Port scanning will not be available: ${error.message}.`);
|
||||
if ((error as NodeJS.ErrnoException).code === "ENOENT") {
|
||||
logger.warn("Port scanning will not be available because netstat is not installed");
|
||||
} else {
|
||||
logger.warn(`Port scanning will not be available: ${error.message}`);
|
||||
}
|
||||
disposed = true;
|
||||
} else if (!disposed) {
|
||||
lastTimeout = setTimeout(doInterval, scanInterval);
|
||||
|
Loading…
Reference in New Issue
Block a user