Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close specific engine instance #5822

Closed
wants to merge 3 commits into from

Conversation

yaron12n
Copy link

@yaron12n yaron12n commented Nov 14, 2024

Proposed changes

Add API for specific engine close.
5821

Checklist

  • Pull request is created against the dev branch
  • All checks passed (lint, unit/integration/regression tests etc.) with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@auto-assign auto-assign bot requested a review from dwisiswant0 November 14, 2024 18:36
@GeorginaReeder
Copy link

Thanks for your contribution @yaron12n ! :)

Copy link
Member

@tarunKoyalwar tarunKoyalwar left a comment

Choose a reason for hiding this comment

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

@yaron12n , pls refer to docs related to library https://pkg.go.dev/github.com/projectdiscovery/nuclei/v3@v3.3.5/lib#section-readme

due to current design (global state variables) . running two instances of NewNucleiEnginexxx gives unexpected results because it overwrites internal global state to avoid this we have added a ThreadSafeNucleiEngine which handles this and reuses the same internal global state and allows running multiple instances in parallel via ExecuteNucleiWithOpts see example in sdk documentation

in this pr you are correctly closing instance only variables but if you check init method the global state is set everytime you run so that issue still remains

we have planned to refactor and remove global state but no ETA on that

@tarunKoyalwar
Copy link
Member

i am currently closing this issue because it doesn't resolve the global state issue , feel free to reopen with more context if you think otherwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants