From c3a4445dcdfe7639fcd88879d3e8adfaaa43332e Mon Sep 17 00:00:00 2001 From: Phillip Trudeau-Tavara Date: Tue, 22 Aug 2023 06:12:21 -0400 Subject: [PATCH] Fix GPT errors causing infinite request loops --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index d5d4b60..b621421 100644 --- a/main.c +++ b/main.c @@ -514,6 +514,8 @@ void generation_thread(void* my_request_voidptr) WinAssertWithErrorCode(WinHttpQueryHeaders(hRequest, WINHTTP_QUERY_STATUS_CODE | WINHTTP_QUERY_FLAG_NUMBER, WINHTTP_HEADER_NAME_BY_INDEX, &status_code, &status_code_size, WINHTTP_NO_HEADER_INDEX)); Log("Status code: %lu\n", status_code); + WinAssertWithErrorCode(status_code != 500); + DWORD dwSize = 0; MD_String8List received_data_list = {0}; do