Skip to content

fix (iworker): handle empty payload and ignore EOF error in parser write#897

Merged
cfc4n merged 2 commits into
masterfrom
bugfix/error-unexpected-eof
Dec 7, 2025
Merged

fix (iworker): handle empty payload and ignore EOF error in parser write#897
cfc4n merged 2 commits into
masterfrom
bugfix/error-unexpected-eof

Conversation

@cfc4n
Copy link
Copy Markdown
Member

@cfc4n cfc4n commented Dec 7, 2025

This pull request introduces improvements to the eventWorker logic in pkg/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:

  • Updated the error check in parserEvents to ignore io.EOF errors, logging only other errors for better clarity and reduced noise.
  • Added a guard in the Display method to prevent processing when the payload is empty, improving efficiency and avoiding potential issues.

Code maintenance:

  • Imported the io package to support the new error handling logic.

fix #896

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 7, 2025
@cfc4n cfc4n requested a review from Copilot December 7, 2025 11:45
@dosubot dosubot Bot added the 🐞 bug Something isn't working label Dec 7, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.EOF error 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 io package import to support the enhanced error handling logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/event_processor/iworker.go Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 7, 2025

✅ E2E Test Results: PASSED

Test Run: #20003714324

Tests Executed:

  • TLS/OpenSSL Module (curl → github.com)
  • GnuTLS Module (wget/curl → github.com)
  • GoTLS Module (Go client → github.com)

✅ All e2e tests passed successfully! The TLS capture functionality is working correctly.


Automated e2e test results for commit 4786e69

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 7, 2025

🔧 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)

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 7, 2025

✅ E2E Test Results: PASSED

Test Run: #20003778757

Tests Executed:

  • TLS/OpenSSL Module (curl → github.com)
  • GnuTLS Module (wget/curl → github.com)
  • GoTLS Module (Go client → github.com)

✅ All e2e tests passed successfully! The TLS capture functionality is working correctly.


Automated e2e test results for commit 5da70ba

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 7, 2025

🔧 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)

@cfc4n cfc4n merged commit 6d53333 into master Dec 7, 2025
11 checks passed
@cfc4n cfc4n deleted the bugfix/error-unexpected-eof branch December 7, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to capture plaintext communication over HTTPS, error message: error: unexpected EOF

2 participants