mirror of https://git.tuxpa.in/a/code-server.git
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");
|
logger.trace("scanning ports");
|
||||||
scan((error) => {
|
scan((error) => {
|
||||||
if (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;
|
disposed = true;
|
||||||
} else if (!disposed) {
|
} else if (!disposed) {
|
||||||
lastTimeout = setTimeout(doInterval, scanInterval);
|
lastTimeout = setTimeout(doInterval, scanInterval);
|
||||||
|
|
Loading…
Reference in New Issue