Skip to content

Document 3-second blocking sleep in WPS disconnect flow#272

Draft
Copilot wants to merge 3 commits intodevelopfrom
copilot/discuss-network-delay-issue
Draft

Document 3-second blocking sleep in WPS disconnect flow#272
Copilot wants to merge 3 commits intodevelopfrom
copilot/discuss-network-delay-issue

Conversation

Copy link

Copilot AI commented Feb 5, 2026

Identified and documented synchronous sleep(3) blocking network thread during WPS operations in v1.13.0 changeset.

Location

File: plugin/gnome/NetworkManagerGnomeWIFI.cpp:1683
Function: wifiManager::wpsProcess()

nm_device_disconnect(wifidevice, NULL, &error);
if (error) {
    NMLOG_ERROR("disconnect connection failed %s", error->message);
    g_error_free(error);
}
sleep(3); // Blocks network thread for 3 seconds

Impact

  • Single occurrence: 3-second blocking delay during WPS disconnect
  • Worst case: 30 seconds cumulative (10 retry iterations × 3 seconds)
  • Context: Triggered when WPS needs to disconnect existing connection before proceeding
  • Blocking nature: Synchronous sleep freezes entire network thread

Documentation Added

  • SLEEP_3SEC_DELAY.md - Detailed analysis of the 3-second sleep with code context, impact assessment, and async replacement recommendations
  • NETWORK_DELAY_ANALYSIS.md - Complete v1.13.0 changeset analysis covering IPv4LL support, WiFi migration logic, and GCancellable implementation

Related Delays

Additional blocking operations identified in WPS flow:

  • Line 1574: sleep(WPS_RETRY_WAIT_IN_MS) - 10-second retry delays
  • Line 1913: g_usleep(500 * 1000) - 500ms delays

The sleep(3) should be replaced with async callback monitoring disconnect state changes rather than fixed-duration blocking.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: vinupalackal <43863033+vinupalackal@users.noreply.github.com>
Copilot AI changed the title [WIP] Analyze changeset impact on network delays Add network delay analysis for v1.13.0 changeset Feb 5, 2026
Copilot AI requested a review from vinupalackal February 5, 2026 21:59
Co-authored-by: vinupalackal <43863033+vinupalackal@users.noreply.github.com>
Copilot AI changed the title Add network delay analysis for v1.13.0 changeset Document 3-second blocking sleep in WPS disconnect flow Feb 5, 2026
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.

2 participants