Skip to content

Commit 31bf166

Browse files
committed
change 0.0.0.0 to 127.0.0.1
1 parent 9034d8a commit 31bf166

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/@ionic/cli-framework/src/utils/network.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ export function isPortAvailableForHost(host: string, port: number): Promise<bool
131131
export async function isHostConnectable(host: string, port: number, { timeout }: { timeout?: number; } = {}): Promise<boolean> {
132132
const tryConnect = async () => {
133133
return new Promise<boolean>((resolve, reject) => {
134+
if (host === '0.0.0.0') {
135+
host = '127.0.0.1';
136+
}
137+
134138
const sock = net.connect({ port, host });
135139

136140
sock.on('connect', () => {

0 commit comments

Comments
 (0)