Skip to content

fix: In synscan mode, complete the expected sleep.#1636

Merged
Mzack9999 merged 2 commits intoprojectdiscovery:devfrom
akkuman:patch-1
Feb 5, 2026
Merged

fix: In synscan mode, complete the expected sleep.#1636
Mzack9999 merged 2 commits intoprojectdiscovery:devfrom
akkuman:patch-1

Conversation

@akkuman
Copy link
Copy Markdown
Contributor

@akkuman akkuman commented Jan 27, 2026

In synscan mode, the program exits immediately after sending all packets, but some packets may still be missing. Following the original definition of Timeout, a sleep period is added to compensate for any unreceived packets.

Summary by CodeRabbit

  • Bug Fixes
    • Improved scan reliability by adding a short stabilization delay after streaming scan completion, ensuring results are fully processed before output.
    • Reduces intermittent missing or incomplete output, yielding more consistent final results and reports.
    • Provides a smoother, more predictable user experience when viewing scan progress and outputs.

In synscan mode, the program exits immediately after sending all packets, but some packets may still be missing. Following the original definition of Timeout, a sleep period is added to compensate for any unreceived packets.
@auto-assign auto-assign bot requested a review from Mzack9999 January 27, 2026 07:36
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 27, 2026

Walkthrough

A sleep is added into the runner's streaming active path: after the scan wait (wgscan.Wait()), the code now pauses for the configured WarmUpTime/GetTimeout duration before continuing to handle output.

Changes

Cohort / File(s) Summary
Scan Phase Delay
pkg/runner/runner.go
Inserted a sleep call that pauses execution for the configured WarmUpTime/GetTimeout immediately after wgscan.Wait() in the streaming active path, prior to output handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A hop, a scan, a moment's pause,
The runner waits without a cause,
Time stretched thin with GetTimeout(),
Before the output takes its bow!
A tiny pause to align the flow.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding an explicit sleep period in synscan mode after packet transmission, which aligns with the code modification adding a delay after wgscan.Wait().
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Mzack9999 Mzack9999 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Feb 5, 2026
@Mzack9999
Copy link
Copy Markdown
Member

@coderabbitai create an issue for this pull request

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 5, 2026

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

@Mzack9999, I'll create an issue for this pull request.


🏁 Script executed:

#!/bin/bash
# Create a GitHub issue for PR `#1636`

gh issue create \
  --repo projectdiscovery/naabu \
  --title "Fix synscan mode to complete expected sleep timeout" \
  --body "In synscan mode, the program currently exits immediately after sending all packets, but some packets may still be unreceived. The expected behavior should follow the original definition of Timeout by adding a sleep period after sending packets to allow time for any remaining responses to arrive before the program exits.

**Related Pull Request:** `#1636`
**Reported by:** `@akkuman`
**Requested by:** `@Mzack9999`" \
  --assignee Mzack9999

Length of output: 53


@Mzack9999, I've successfully created issue #1641 for this pull request. The issue has been assigned to you and includes a backlink to PR #1636.

@Mzack9999 Mzack9999 linked an issue Feb 5, 2026 that may be closed by this pull request
@Mzack9999 Mzack9999 merged commit 67a1cca into projectdiscovery:dev Feb 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix synscan mode to complete expected sleep timeout

2 participants