* run

* print socketg error on change

* typo

* resa

* fix??

* try

* try error

* fix error, add more info

* some tests

* more self tests

* tests
This commit is contained in:
openshwprojects
2024-09-21 07:21:19 +02:00
committed by GitHub
parent 4a7ed0238b
commit 20d21d0a53
7 changed files with 50 additions and 2 deletions

View File

@ -78,6 +78,8 @@ int HTTPServer_Start() {
}
}
#define DEFAULT_BUFLEN 10000
int g_prevHTTPResult;
void HTTPServer_RunQuickTick() {
int iResult;
int err;
@ -93,7 +95,10 @@ void HTTPServer_RunQuickTick() {
if (ClientSocket == INVALID_SOCKET) {
iResult = WSAGetLastError();
if(iResult != WSAEWOULDBLOCK) {
printf("accept failed with error: %d\n", iResult);
if (iResult != g_prevHTTPResult) {
printf("accept failed with error: %d\n", iResult);
g_prevHTTPResult = iResult;
}
}
return;
}