Skip to content

Commit ad63be4

Browse files
committed
Fix more Docker pipe errors in Windows docker-compose
1 parent 28a2091 commit ad63be4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/interceptors/docker/docker-proxy.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,14 @@ async function createDockerProxy(proxyPort: number, httpsConfig: { certPath: str
364364
await deleteFile(proxyListenPath).catch(() => {});
365365
}
366366

367+
if (process.platform === 'win32') {
368+
// We're using local pipes - we can safely keep connections open forever, and doing so is
369+
// necessary on Windows, because docker-compose there does not expected connections in its
370+
// pool to ever be closed by the server, and crashes if they are. Can't use actual Infinity
371+
// since Node rejects it, but 1 hour should be far more than any client's own timeout.
372+
server.keepAliveTimeout = 1000 * 60 * 60;
373+
}
374+
367375
await new Promise<void>((resolve, reject) => {
368376
server.listen(proxyListenPath, resolve);
369377
server.on('error', reject);

0 commit comments

Comments
 (0)