fix (iworker): handle empty payload and ignore EOF error in parser write#897
Conversation
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
There was a problem hiding this comment.
Pull request overview
This pull request improves error handling and robustness in the event worker by filtering out expected io.EOF errors and adding an early return for empty payloads to prevent unnecessary processing.
- Added
io.EOFerror filtering in parser write operations to reduce log noise from expected end-of-stream conditions - Introduced empty payload guard in
Display()method to optimize performance and prevent processing when no data is present - Added
iopackage import to support the enhanced error handling logic
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ E2E Test Results: PASSEDTest Run: #20003714324 Tests Executed:
✅ All e2e tests passed successfully! The TLS capture functionality is working correctly. Automated e2e test results for commit 4786e69 |
Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
|
🔧 Debug Build Complete (PR #897) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. This build includes debug binaries for: android/linux (arm64/amd64) |
✅ E2E Test Results: PASSEDTest Run: #20003778757 Tests Executed:
✅ All e2e tests passed successfully! The TLS capture functionality is working correctly. Automated e2e test results for commit 5da70ba |
|
🔧 Debug Build Complete (PR #897) 📦 Download Links: ⏰ Files will be retained for 7 days, please download and test promptly. This build includes debug binaries for: android/linux (arm64/amd64) |
This pull request introduces improvements to the
eventWorkerlogic inpkg/event_processor/iworker.go, focusing on error handling and code robustness. The most notable changes include refining how parser errors are handled, preventing unnecessary processing of empty payloads, and updating imports for new error checks.Error handling and robustness improvements:
parserEventsto ignoreio.EOFerrors, logging only other errors for better clarity and reduced noise.Displaymethod to prevent processing when the payload is empty, improving efficiency and avoiding potential issues.Code maintenance:
iopackage to support the new error handling logic.fix #896