mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 12:24:10 +00:00
winhttp: Handle TLS close notify in netconn_is_alive().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2bbb725bb0
commit
93b07c091b
|
@ -616,11 +616,31 @@ DWORD netconn_set_timeout( struct netconn *netconn, BOOL send, int value )
|
||||||
|
|
||||||
BOOL netconn_is_alive( struct netconn *netconn )
|
BOOL netconn_is_alive( struct netconn *netconn )
|
||||||
{
|
{
|
||||||
|
SIZE_T size;
|
||||||
int len;
|
int len;
|
||||||
char b;
|
char b;
|
||||||
DWORD err;
|
DWORD err;
|
||||||
|
BOOL eof;
|
||||||
|
|
||||||
set_blocking( netconn, FALSE );
|
set_blocking( netconn, FALSE );
|
||||||
|
if (netconn->secure)
|
||||||
|
{
|
||||||
|
while (!netconn->peek_msg && !(err = read_ssl_chunk( netconn, NULL, 0, &size, &eof )) && !eof)
|
||||||
|
;
|
||||||
|
|
||||||
|
TRACE("Checking secure connection, err %d.\n", err);
|
||||||
|
|
||||||
|
if (netconn->peek_msg || err == WSAEWOULDBLOCK)
|
||||||
|
{
|
||||||
|
set_blocking( netconn, TRUE );
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
if (err != SEC_E_OK && err != SEC_E_INCOMPLETE_MESSAGE)
|
||||||
|
{
|
||||||
|
set_blocking( netconn, TRUE );
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
len = sock_recv( netconn->socket, &b, 1, MSG_PEEK );
|
len = sock_recv( netconn->socket, &b, 1, MSG_PEEK );
|
||||||
err = WSAGetLastError();
|
err = WSAGetLastError();
|
||||||
set_blocking( netconn, TRUE );
|
set_blocking( netconn, TRUE );
|
||||||
|
|
Loading…
Reference in a new issue