socket blocked after several iterations
Brought to you by:
julian69
i am using odbc socket server with an ms access
database.
it works great with one or two users (web application)
but with more simultaneous users odbc socket server
seems to freeze
after searching in source code i have found the bug
pb was local variable passed in function _beginthread
here are the changes you have to do in main-server.cpp
> void ProcessSocket(void* sdPass)
{
SOCKET sd= (SOCKET)(sdPass);
//init OLE
CoInitialize(NULL);
//read and write the socket
> ReadAndWriteSocket((sd));
CoUninitialize();
//end the thread
_endthread();
}
and in DoWinsock function
//start processing
_beginthread(ProcessSocket, 0, (void*)sd);
Logged In: YES
user_id=854199
I've made this changes but socket get already blocked (but
cpu is not at 100%) ?