惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog RSS Feed
Y
Y Combinator Blog
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
M
MIT News - Artificial intelligence
Last Week in AI
Last Week in AI
V
V2EX
腾讯CDC
F
Fortinet All Blogs
博客园 - 叶小钗
T
The Blog of Author Tim Ferriss

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(gateway): drop stale webchat handshakes · openclaw/op...
steipete · 2026-04-27 · via Recent Commits to openclaw:main

@@ -201,7 +201,7 @@ export function attachGatewayWsMessageHandler(params: {

201201

isClosed: () => boolean;

202202

clearHandshakeTimer: () => void;

203203

getClient: () => GatewayWsClient | null;

204-

setClient: (next: GatewayWsClient) => void;

204+

setClient: (next: GatewayWsClient) => boolean;

205205

setHandshakeState: (state: "pending" | "connected" | "failed") => void;

206206

setCloseCause: (cause: string, meta?: Record<string, unknown>) => void;

207207

setLastFrameMeta: (meta: { type?: string; method?: string; id?: string }) => void;

@@ -1266,39 +1266,12 @@ export function attachGatewayWsMessageHandler(params: {

12661266

const instanceId = connectParams.client.instanceId;

12671267

const presenceKey = shouldTrackPresence ? (device?.id ?? instanceId ?? connId) : undefined;

126812681269-

logWs("in", "connect", {

1270-

connId,

1271-

client: connectParams.client.id,

1272-

clientDisplayName: connectParams.client.displayName,

1273-

version: connectParams.client.version,

1274-

mode: connectParams.client.mode,

1275-

clientId,

1276-

platform: connectParams.client.platform,

1277-

auth: authMethod,

1278-

});

1279-1280-

if (isWebchatConnect(connectParams)) {

1281-

logWsControl.info(

1282-

`webchat connected conn=${connId} remote=${remoteAddr ?? "?"} client=${clientLabel} ${connectParams.client.mode} v${connectParams.client.version}`,

1283-

);

1284-

}

1285-1286-

if (presenceKey) {

1287-

upsertPresence(presenceKey, {

1288-

host: connectParams.client.displayName ?? connectParams.client.id ?? os.hostname(),

1289-

ip: isLocalClient ? undefined : reportedClientIp,

1290-

version: connectParams.client.version,

1291-

platform: connectParams.client.platform,

1292-

deviceFamily: connectParams.client.deviceFamily,

1293-

modelIdentifier: connectParams.client.modelIdentifier,

1294-

mode: connectParams.client.mode,

1295-

deviceId: device?.id,

1296-

roles: [role],

1297-

scopes,

1298-

instanceId: device?.id ?? instanceId,

1299-

reason: "connect",

1269+

if (isClosed()) {

1270+

setCloseCause("connect-aborted-before-register", {

1271+

...clientMeta,

1272+

auth: authMethod,

13001273

});

1301-

incrementPresenceVersion();

1274+

return;

13021275

}

1303127613041277

const snapshot = buildGatewaySnapshot({

@@ -1367,8 +1340,48 @@ export function attachGatewayWsMessageHandler(params: {

13671340

canvasCapabilityExpiresAtMs,

13681341

};

13691342

setSocketMaxPayload(socket, MAX_PAYLOAD_BYTES);

1370-

setClient(nextClient);

1343+

if (!setClient(nextClient)) {

1344+

setCloseCause("connect-aborted-before-register", {

1345+

...clientMeta,

1346+

auth: authMethod,

1347+

});

1348+

return;

1349+

}

13711350

setHandshakeState("connected");

1351+

logWs("in", "connect", {

1352+

connId,

1353+

client: connectParams.client.id,

1354+

clientDisplayName: connectParams.client.displayName,

1355+

version: connectParams.client.version,

1356+

mode: connectParams.client.mode,

1357+

clientId,

1358+

platform: connectParams.client.platform,

1359+

auth: authMethod,

1360+

});

1361+1362+

if (isWebchatConnect(connectParams)) {

1363+

logWsControl.info(

1364+

`webchat connected conn=${connId} remote=${remoteAddr ?? "?"} client=${clientLabel} ${connectParams.client.mode} v${connectParams.client.version}`,

1365+

);

1366+

}

1367+1368+

if (presenceKey) {

1369+

upsertPresence(presenceKey, {

1370+

host: connectParams.client.displayName ?? connectParams.client.id ?? os.hostname(),

1371+

ip: isLocalClient ? undefined : reportedClientIp,

1372+

version: connectParams.client.version,

1373+

platform: connectParams.client.platform,

1374+

deviceFamily: connectParams.client.deviceFamily,

1375+

modelIdentifier: connectParams.client.modelIdentifier,

1376+

mode: connectParams.client.mode,

1377+

deviceId: device?.id,

1378+

roles: [role],

1379+

scopes,

1380+

instanceId: device?.id ?? instanceId,

1381+

reason: "connect",

1382+

});

1383+

incrementPresenceVersion();

1384+

}

13721385

if (role === "node") {

13731386

const context = buildRequestContext();

13741387

const nodeSession = context.nodeRegistry.register(nextClient, {