mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fixes to proxy on macos: prevent curl from hanging during wait-for-proxy by adding ipv6 support and timeout (#947)
This commit is contained in:
@@ -339,7 +339,7 @@ export async function start_sandbox(sandbox: string) {
|
||||
});
|
||||
console.log('waiting for proxy to start ...');
|
||||
await execAsync(
|
||||
`until curl -s http://localhost:8877; do sleep 0.25; done`,
|
||||
`until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done`,
|
||||
);
|
||||
}
|
||||
// spawn child and let it inherit stdio
|
||||
@@ -661,7 +661,9 @@ export async function start_sandbox(sandbox: string) {
|
||||
process.exit(1);
|
||||
});
|
||||
console.log('waiting for proxy to start ...');
|
||||
await execAsync(`until curl -s http://localhost:8877; do sleep 0.25; done`);
|
||||
await execAsync(
|
||||
`until timeout 0.25 curl -s http://localhost:8877; do sleep 0.25; done`,
|
||||
);
|
||||
// connect proxy container to sandbox network
|
||||
// (workaround for older versions of docker that don't support multiple --network args)
|
||||
await execAsync(
|
||||
|
||||
Reference in New Issue
Block a user