Commit 20bfcb3
fix(transport-webrtc): abort stream when datachannel send throws (#3469)
* test(transport-webrtc): reproduce datachannel send during state divergence
Triggers the JS-vs-native state divergence in node-datachannel polyfill by
closing the peer connection synchronously before send(), so the cached
readyState is still 'open' while the native channel is closed.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(transport-webrtc): abort stream when datachannel send throws
channel.send can throw synchronously when the native libdatachannel
state diverges from the polyfill's cached readyState. Wrap the call
and abort the stream so the error surfaces as a transport failure
instead of going uncaught.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* test(transport-webrtc): skip datachannel send race test in browsers
The JS-vs-native state divergence is specific to the node-datachannel
polyfill; native browser WebRTC does not reproduce it. Also add
libdatachannel to the spell-check dictionary for the new fix comment.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* chore(transport-webrtc): shorten comments on send error fix
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 7cea7b9 commit 20bfcb3
2 files changed
Lines changed: 74 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
75 | 139 | | |
76 | 140 | | |
77 | 141 | | |
| |||
0 commit comments