Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): a macOS setTypeOfService EINVAL no longer kills the backend #20414

Mergedonly21mil(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/20414/headmerged by juliusmarminge View on GitHub

Showing 3 changed files with 168 additions and 0 deletions.

x
0 of 3 viewed, 3 left
3 additions and 0 deletionsapps/server/src/bin.tsModified
View file
@@ -14,6 +14,9 @@
})
) {
const command = process.argv[2];
+ // Guard sockets before either dispatch path can load outbound-capable modules.
+ const { ignoreMacosTypeOfServiceEinval } = await import("./outboundHttp.ts");
+ ignoreMacosTypeOfServiceEinval();
if (command === "acp-mcp-bridge" || command === "acp-mcp-call") {
const { runAcpMcpCliFastPath } = await import("./mcp/AcpMcpStdioBridge.ts");
await runAcpMcpCliFastPath(command, process.argv.slice(3));
140 additions and 0 deletionsapps/server/src/outboundHttp.test.tsModified
View file
@@ -2,9 +2,13 @@
import * as NodeHttp2 from "node:http2";
import * as NodeNet from "node:net";
import * as NodeTls from "node:tls";
+import * as NodeURL from "node:url";
​
+import * as NodeServices from "@effect/platform-node/NodeServices";
import { it } from "@effect/vitest";
import * as Effect from "effect/Effect";
+import * as Stream from "effect/Stream";
+import { ChildProcess, ChildProcessSpawner } from "effect/process";
import { FetchHttpClient, HttpClient } from "effect/http";
import * as Undici from "undici";
import { afterAll, afterEach, beforeAll, describe, expect } from "vite-plus/test";
@@ -12,6 +16,7 @@