Check-in [fe6d401e68]
Overview
Comment:Made socket idle timeout checks more frequent
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | remove-c11-atomics
Files: files | file ages | folders
SHA1:fe6d401e68486424df880ddf86bc7c49053be9f1
User & Date: rkeene on 2020-03-31 14:26:00
Other Links: manifest | tags
Context
2020-03-31
14:30
Integrated remove-c11-atomics changes check-in: 7ee2e833d2 user: rkeene tags: trunk
14:26
Made socket idle timeout checks more frequent Closed-Leaf check-in: fe6d401e68 user: rkeene tags: remove-c11-atomics
14:20
Log the connect time, which is significant for closed sockets since they have no request time (since no request was made) check-in: 05f8958cc7 user: rkeene tags: remove-c11-atomics
Changes

Modified filed.c from [20cb1acc5e] to [7252b16239].

   720    720   static void *filed_sockettimeout_thread(void *arg) {
   721    721   	struct timespec sleep_time;
   722    722   	time_t now, expiration_time;
   723    723   	pthread_t thread_id;
   724    724   	long idx;
   725    725   	int count;
   726    726   	int valid;
          727  +	int time_interval = 30;
          728  +	int check_period = 90;
   727    729   
   728    730   	while (1) {
   729         -		for (count = 0; count < 10; count++) {
   730         -			sleep_time.tv_sec = 30;
          731  +		for (count = 0; count < (check_period / time_interval); count++) {
          732  +			sleep_time.tv_sec = time_interval;
   731    733   			sleep_time.tv_nsec = 0;
   732    734   			nanosleep(&sleep_time, NULL);
   733    735   
   734    736   			pthread_mutex_lock(&filed_sockettimeout_mutex);
   735    737   
   736    738   			now = time(NULL);
   737    739