mirror of
https://github.com/openshwprojects/OpenBK7231T_App.git
synced 2026-02-06 16:35:46 +00:00
add month stub, disable lagging tcp close code for windows
This commit is contained in:
@ -173,22 +173,22 @@ void HTTPServer_RunQuickTick() {
|
||||
//Sleep(50);
|
||||
// shutdown the connection since we're done
|
||||
iResult = shutdown(ClientSocket, SD_SEND);
|
||||
long firstAttempt = timeGetTime();
|
||||
while (1) {
|
||||
iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
|
||||
if (iResult == 0)
|
||||
break;
|
||||
err = WSAGetLastError();
|
||||
if (err != WSAEWOULDBLOCK) {
|
||||
break;
|
||||
}
|
||||
long delta = timeGetTime() - firstAttempt;
|
||||
if (delta > 2) {
|
||||
printf("HTTP server would freeze to long!\n");
|
||||
break; // too long freeze!
|
||||
//long firstAttempt = timeGetTime();
|
||||
//while (1) {
|
||||
// iResult = recv(ClientSocket, recvbuf, recvbuflen, 0);
|
||||
// if (iResult == 0)
|
||||
// break;
|
||||
// err = WSAGetLastError();
|
||||
// if (err != WSAEWOULDBLOCK) {
|
||||
// break;
|
||||
// }
|
||||
// long delta = timeGetTime() - firstAttempt;
|
||||
// if (delta > 2) {
|
||||
// printf("HTTP server would freeze to long!\n");
|
||||
// break; // too long freeze!
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
//}
|
||||
//Sleep(50);
|
||||
//iResult = closesocket(ClientSocket);
|
||||
//if (iResult == SOCKET_ERROR) {
|
||||
|
||||
Reference in New Issue
Block a user