mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
Add regular expressions and "others" to portsAttributes
Fixes microsoft/vscode-remote-release#4623
This commit is contained in:
@@ -123,9 +123,9 @@ export async function findPorts(tcp: string, tcp6: string, procSockets: string,
|
||||
|
||||
const ports: CandidatePort[] = [];
|
||||
connections.filter((connection => socketMap[connection.socket])).forEach(({ socket, ip, port }) => {
|
||||
const command = processMap[socketMap[socket].pid].cmd;
|
||||
if (!knownExcludeCmdline(command)) {
|
||||
ports.push({ host: ip, port, detail: processMap[socketMap[socket].pid].cmd, pid: socketMap[socket].pid });
|
||||
const command: string | undefined = processMap[socketMap[socket].pid]?.cmd;
|
||||
if (command && !knownExcludeCmdline(command)) {
|
||||
ports.push({ host: ip, port, detail: command, pid: socketMap[socket].pid });
|
||||
}
|
||||
});
|
||||
return ports;
|
||||
|
||||
Reference in New Issue
Block a user