- if( ClientID == 0 )
- {
- ret->ClientID = giServer_NextClientID ++;
- ret->CurrentRequest = NULL;
-
- if( !ret->WorkerThread ) {
- ret->WorkerThread = SDL_CreateThread( Server_WorkerThread, ret );
- ret->WaitFlag = SDL_CreateCond();
- ret->Mutex = SDL_CreateMutex();
- SDL_mutexP( ret->Mutex );
- }
+ // Allocate a thread for the process
+ ret->ClientID = ClientID;
+ ret->CurrentRequest = NULL;
+
+ if( !ret->WorkerThread ) {
+ ret->WaitFlag = SDL_CreateCond();
+ ret->Mutex = SDL_CreateMutex();
+ SDL_mutexP( ret->Mutex );
+ ret->WorkerThread = SDL_CreateThread( Server_WorkerThread, ret );