Commit a434f2c
Nitesh Kant
Fixes buffer management issue in ServerSentEventDecoder.
The lastEventType and lastEventId buffers were reused but not retained. This would make the buffers recycled after a generated ServerSentEvent (using these buffers) is released. This leads to all sort of issues, from illegal reference count to wrong dangling pointers.
Now, retaining the buffers for lastEventId and lastEventType once (on channel remove or on receiving a new id/type) whenever they are used to create a ServerSentEvent instance. These buffers are released when the handler is removed.1 parent 04ae32a commit a434f2c
File tree
1 file changed
+12
-0
lines changed- rxnetty/src/main/java/io/reactivex/netty/protocol/http/sse
1 file changed
+12
-0
lines changedLines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
| |||
207 | 213 | | |
208 | 214 | | |
209 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
| |||
215 | 224 | | |
216 | 225 | | |
217 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
218 | 230 | | |
219 | 231 | | |
220 | 232 | | |
| |||
0 commit comments