moved registering connection to new thread
This commit is contained in:
parent
924c840e0d
commit
c47c9ffece
@ -50,7 +50,6 @@ int main(void)
|
||||
if (accepted == -1) continue;
|
||||
|
||||
pthread_create(&thread, NULL, why2_communicate_thread, &accepted);
|
||||
why2_register_connection(accepted); //PUSH TO LIST
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -133,6 +133,8 @@ void *why2_communicate_thread(void *arg)
|
||||
{
|
||||
printf("User connected.\t%d\n", *((int*) arg));
|
||||
|
||||
why2_register_connection(*((int*) arg)); //TODO: Remove why2_register_connection if unused
|
||||
|
||||
const time_t startTime = time(NULL);
|
||||
char *received = NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user