if( !ret ) {
printf("[ERROR %i] Timeout reading from socket\n", giSyscall_ClientID);
- return 0; // Timeout
+ return -2; // Timeout
}
#if USE_TCP
perror("ReadData");
exit(-1);
}
+ if( ret == 0 ) {
+ fprintf(stderr, "[ERROR %i] Connection closed.\n", giSyscall_ClientID);
+ exit(0);
+ }
DEBUG_S("%i bytes read from socket\n", ret);