Commit 3c58a2a
transport/rawsocket: abort on deserialize error per WAMP §5.3.1
Changes recvHandler's malformed-payload path from
`continue MsgLoop` (silently skip the bad frame and keep reading)
to log + conn.Close() + return — the same teardown shape as the
io.ReadFull error path above. Per WAMP §5.3.1 a malformed payload
is a protocol violation and the receiver MUST abort.
The original code carried a `// TODO: something more than merely
logging?` comment hinting this was permissive. Senders that need
fault-tolerance for occasional malformed frames must reconnect.
Updates TestRawSocketC5_DeserializerErrorAborts on
pr/rawsocket-frame-edges to assert the new strict semantic
(Recv channel closes after the malformed frame).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6eca374 commit 3c58a2a
2 files changed
Lines changed: 24 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
306 | 309 | | |
307 | | - | |
| 310 | + | |
| 311 | + | |
308 | 312 | | |
309 | 313 | | |
310 | 314 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
165 | 166 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
176 | 177 | | |
177 | 178 | | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
186 | 182 | | |
187 | 183 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 184 | + | |
191 | 185 | | |
192 | | - | |
| 186 | + | |
193 | 187 | | |
194 | 188 | | |
195 | 189 | | |
| |||
0 commit comments