Re: [PATCH 4/7] simple-ipc/ipc-win32: add trace2 debugging
From: Jeff Hostetler <hidden>
Date: 2021-09-17 17:27:17
On 9/16/21 1:40 AM, Ævar Arnfjörð Bjarmason wrote:
On Wed, Sep 15 2021, Jeff Hostetler via GitGitGadget wrote:quoted
@@ -112,6 +115,11 @@ static enum ipc_active_state connect_to_server( if (GetLastError() == ERROR_SEM_TIMEOUT) return IPC_STATE__NOT_LISTENING; + gle = GetLastError(); + trace2_data_intmax("ipc-debug", NULL, + "connect/waitpipe/gle", + (intmax_t)gle); + return IPC_STATE__OTHER_ERROR; }...
>
quoted hunk ↗ jump to hunk
@@ -109,9 +109,12 @@ static enum ipc_active_state connect_to_server( t_start_ms = (DWORD)(getnanotime() / 1000000); if (!WaitNamedPipeW(wpath, timeout_ms)) { - if (GetLastError() == ERROR_SEM_TIMEOUT) + gle = GetLastError(); + if (gle == ERROR_SEM_TIMEOUT) return IPC_STATE__NOT_LISTENING; + /* ...rest of your patch */ + return IPC_STATE__OTHER_ERROR; }
Yeah, I was just trying to minimize the size of the diff and at the time was considering those debug messages to be temporary, but I kind of like having them so it makes sense to clean up a bit as you've indicated. Thanks Jeff