Commit 53c6f56
Pavel Siska
ipfix: fix stuck flushing loop after TCP disconnect in LZ4 mode
In LZ4 compress mode, a failed send_packet() call in send_templates()
left readSize non-zero, causing the next getWriteBuffer() in send_data()
to return null and exit without clearing template buffers.
Fix by adding CompressBuffer::getWriteBufferOrReset() which resets via
shrinkTo(0) and retries once on null.1 parent 6c8fc7e commit 53c6f56
2 files changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
| 821 | + | |
822 | 822 | | |
823 | | - | |
824 | | - | |
825 | 823 | | |
826 | 824 | | |
827 | 825 | | |
| |||
1227 | 1225 | | |
1228 | 1226 | | |
1229 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1230 | 1238 | | |
1231 | 1239 | | |
1232 | 1240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
460 | 471 | | |
461 | 472 | | |
462 | 473 | | |
| |||
0 commit comments