#14746·meteor

uws transport: 版本协商的 DDP '失败' 帧永远不会被传递

作者: dupontbertrand创建于 2026年9月12日更新于 2026年9月12日

// node repro.mjs import uws from 'uWebSockets.js'; const app = uws.App(); app.ws('/*', { open(socket) { socket.send(JSON.stringify({ msg: 'failed', version: '1' })); if (process.env.MODE === 'end') socket.end(); else socket.close(); }, }); app.listen('127.0.0.1', 5199, uws.LIBUS_LISTEN_EXCLUSIVE_PORT, (token) => { // EXCLUSIVE_PORT makes a second listen fail silently, so check the token: // otherwise a leftover server on 5199 answers and the result is misleading. if (!token) throw new Error('could not listen on 127.0.0.1:5199'); });


A `ws` client connecting to it observes: