{"record":{"id":"f4142caca2edeced","repo":"rustdesk/rustdesk","slug":"failed-to-complete-pipe-connection","errorCode":null,"errorMessage":"Failed to complete pipe connection {}: {}","messagePattern":"Failed to complete pipe connection (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/server/terminal_helper.rs","lineNumber":655,"sourceCode":"                    \"Timeout waiting for pipe connection: {}\",\n                    pipe_name\n                ));\n            }\n\n            // Check if connection was successful\n            let mut bytes_transferred = 0u32;\n            let overlapped_result = unsafe {\n                GetOverlappedResult(\n                    pipe_handle.as_raw(),\n                    &overlapped,\n                    &mut bytes_transferred,\n                    false,\n                )\n            };\n            if overlapped_result.is_err() {\n                let err = std::io::Error::last_os_error();\n                log::error!(\"Failed to complete pipe connection {}: {}\", pipe_name, err);\n                return Err(anyhow!(\n                    \"Failed to complete pipe connection {}: {}\",\n                    pipe_name,\n                    err\n                ));\n            }\n\n            log::debug!(\"Pipe connected: {}\", pipe_name);\n        } else {\n            log::error!(\"Failed to connect named pipe {}: {}\", pipe_name, err);\n            return Err(anyhow!(\n                \"Failed to connect named pipe {}: {}\",\n                pipe_name,\n                err\n            ));\n        }\n    } else {\n        log::debug!(\"Pipe connected immediately: {}\", pipe_name);\n    }","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/rustdesk/rustdesk/blob/91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540/src/server/terminal_helper.rs#L637-L673","documentation":"After the wait was signalled, GetOverlappedResult reported failure for the pipe connection: the overlapped ConnectNamedPipe completed with an error (e.g. client disconnected between connect and completion, or broken pipe). Both the pipe name and OS error are reported before the handle is closed.","triggerScenarios":"Thrown at src/server/terminal_helper.rs:655 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry terminal creation — the helper may have crashed or exited right after connecting; check its exit code","Inspect the appended OS error (ERROR_BROKEN_PIPE, ERROR_NO_DATA point to the client side vanishing)","Ensure the helper binary version matches the service (a mismatched helper can mishandle the pipe protocol)"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"91c9fccbb0f7bfe5f11644d5fbdec9b23fa10540","analyzedAt":"2026-09-10T19:53:44.083Z","contentChangedAt":"2026-09-10T19:53:44.083Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}