mirror of
https://github.com/coder/coder.git
synced 2026-06-03 13:08:25 +00:00
581f3bdd14
The `mockEventSenderWrite` function in `newOneWayWriter()` wrote WebSocket frame data to both the `net.Pipe` and the `httptest.ResponseRecorder`. After `websocket.Accept()` calls `WriteHeader(101)`, the recorder rejects body writes with `"response status code does not allow body"`. When `HeartbeatClose` sends a ping, the control frame flush routes through the recorder, producing an ERROR-level log that `slogtest` catches as a test failure. Removed the `recorder.Write(b)` call from the write function. The recorder is only needed for header/status inspection; WebSocket frame data should only go through the `net.Pipe`. Closes https://github.com/coder/internal/issues/1521 > 🤖 Generated by Coder Agents