Commit 673a01a4 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

winhttp: Don't mind socket state in WinHttpWebSocketQueryCloseStatus().

parent 63ce184f
...@@ -3991,11 +3991,6 @@ DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status ...@@ -3991,11 +3991,6 @@ DWORD WINAPI WinHttpWebSocketQueryCloseStatus( HINTERNET hsocket, USHORT *status
release_object( &socket->hdr ); release_object( &socket->hdr );
return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE; return ERROR_WINHTTP_INCORRECT_HANDLE_TYPE;
} }
if (socket->state < SOCKET_STATE_CLOSED)
{
release_object( &socket->hdr );
return ERROR_INVALID_OPERATION;
}
if (!socket->close_frame_received || socket->close_frame_receive_err) if (!socket->close_frame_received || socket->close_frame_receive_err)
{ {
......
...@@ -1126,9 +1126,9 @@ static void test_websocket(BOOL secure) ...@@ -1126,9 +1126,9 @@ static void test_websocket(BOOL secure)
close_status = 0xdead; close_status = 0xdead;
size = sizeof(buffer) + 1; size = sizeof(buffer) + 1;
err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size ); err = pWinHttpWebSocketQueryCloseStatus( socket, &close_status, buffer, sizeof(buffer), &size );
todo_wine ok( err == ERROR_SUCCESS, "got %u\n", err ); ok( err == ERROR_SUCCESS, "got %u\n", err );
todo_wine ok( close_status == 1000, "got %u\n", close_status ); ok( close_status == 1000, "got %u\n", close_status );
todo_wine ok( size <= sizeof(buffer), "got %u\n", size ); ok( size <= sizeof(buffer), "got %u\n", size );
setup_test( &info, winhttp_close_handle, __LINE__ ); setup_test( &info, winhttp_close_handle, __LINE__ );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment