Menu

#4 socket blocked after several iterations

open
None
5
2002-11-10
2002-09-30
Anonymous
No

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);

Discussion

  • Julián Muńoz

    Julián Muńoz - 2002-11-10
    • assigned_to: nobody --> tgueth
     
  • Poisk AIlle

    Poisk AIlle - 2003-08-29

    Logged In: YES
    user_id=854199

    I've made this changes but socket get already blocked (but
    cpu is not at 100%) ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.