From: Hans Leidekker Subject: Re: [PATCH v2 5/6] winhttp: Don't send pong on timeout in socket_receive(). Message-Id: Date: Wed, 26 Jan 2022 15:26:57 +0100 In-Reply-To: <20220126131419.1337268-5-pgofman@codeweavers.com> References: <20220126131419.1337268-1-pgofman@codeweavers.com> <20220126131419.1337268-5-pgofman@codeweavers.com> On Wed, 2022-01-26 at 16:14 +0300, Paul Gofman wrote: > Signed-off-by: Paul Gofman > --- >      v2: >           - no changes. > >      As testing involves waiting for timeouts it doesn't look good for inclusion into the test suite. >      I've tested this change separately: https://gist.github.com/gofman/bd2f3b6fd6cbe993e97353560ce81e04 >      This test succeeds on Windows for me but fails without this patch in Wine: the server close status received >      during closing handshake becomes WINHTTP_WEB_SOCKET_PROTOCOL_ERROR_CLOSE_STATUS (1002). > >      Sending ping instead of pong causes the server to send a pong reply as expected although I still see status >      1002 on close after. Which probably suggests that Windows doesn't send the ping as well (I also tried that with >      WINHTTP_OPTION_WEB_SOCKET_KEEPALIVE_INTERVAL socket option set to 15000 and Sleep to 30000). It should be an unsollicited pong, which serves as a keepalive packet. I'm pretty sure I observed this, although I don't remember the exact conditions.