mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix port availability test
Problem raised on macOS where port 49152 was used by rapportd process listening on 0.0.0.0 address and as a consequence the application proxy server wasn't correctly setup that in turn disrupted the webview display that wasn't served through http://<uid>.localhost:49152/ (#255) Indeed the checkPort() function was checking port availability using the 127.0.0.1 address that doesn't error. The minimal fix here is to test port availability using 0.0.0.0 address. Signed-off-by: Alexis Deruelle <alexis.deruelle@gmail.com>
This commit is contained in:
parent
03aab714d8
commit
98f250cfc4
@ -9,7 +9,7 @@ function checkPort(port: number) {
|
||||
server
|
||||
.on('error', error => reject(error))
|
||||
.on('listening', () => server.close(() => resolve(port)))
|
||||
.listen({host: "127.0.0.1", port: port}))
|
||||
.listen({host: "0.0.0.0", port: port}))
|
||||
}
|
||||
|
||||
export async function getFreePort(firstPort: number, lastPort: number): Promise<number> {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user