Hi!
I have found a system where I was able to reproduce this problem. And yes, it was solved by switching to non-blocking sockets for client connections. I made necessary changes in svn trunk, and version 1.2.2 will contain this fix. Changes are minimal - see diff below:
Best regards,
Victor
I have found a system where I was able to reproduce this problem. And yes, it was solved by switching to non-blocking sockets for client connections. I made necessary changes in svn trunk, and version 1.2.2 will contain this fix. Changes are minimal - see diff below:
Code Select
Modified: trunk/src/server/core/client.cpp
===================================================================
--- trunk/src/server/core/client.cpp 2012-06-20 17:39:09 UTC (rev 6534)
+++ trunk/src/server/core/client.cpp 2012-06-20 20:25:43 UTC (rev 6535)
@@ -195,6 +195,7 @@
}
errorCount = 0; // Reset consecutive errors counter
+ SetSocketNonBlocking(sockClient);
// Create new session structure and threads
pSession = new ClientSession(sockClient, (struct sockaddr *)&servAddr);
@@ -287,6 +288,7 @@
}
errorCount = 0; // Reset consecutive errors counter
+ SetSocketNonBlocking(sockClient);
// Create new session structure and threads
pSession = new ClientSession(sockClient, (struct sockaddr *)&servAddr);
Modified: trunk/src/server/core/session.cpp
===================================================================
--- trunk/src/server/core/session.cpp 2012-06-20 17:39:09 UTC (rev 6534)
+++ trunk/src/server/core/session.cpp 2012-06-20 20:25:43 UTC (rev 6535)
@@ -393,7 +393,8 @@
{
if ((iErr = RecvNXCPMessageEx(m_hSocket, &pRawMsg, m_pMsgBuffer, &msgBufferSize,
&m_pCtx, (pDecryptionBuffer != NULL) ? &pDecryptionBuffer : NULL,
- INFINITE, MAX_MSG_SIZE)) <= 0) {
+ 900000, MAX_MSG_SIZE)) <= 0) // timeout 15 minutes
+ {
DebugPrintf(5, _T("RecvNXCPMessageEx failed (%d)"), iErr);
break;
Best regards,
Victor
