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: branch diff | 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
721
722
723
724
725
726


727
728
729
730


731
732
733
734
735
736
737
720
721
722
723
724
725
726
727
728
729
730


731
732
733
734
735
736
737
738
739







+
+


-
-
+
+







static void *filed_sockettimeout_thread(void *arg) {
	struct timespec sleep_time;
	time_t now, expiration_time;
	pthread_t thread_id;
	long idx;
	int count;
	int valid;
	int time_interval = 30;
	int check_period = 90;

	while (1) {
		for (count = 0; count < 10; count++) {
			sleep_time.tv_sec = 30;
		for (count = 0; count < (check_period / time_interval); count++) {
			sleep_time.tv_sec = time_interval;
			sleep_time.tv_nsec = 0;
			nanosleep(&sleep_time, NULL);

			pthread_mutex_lock(&filed_sockettimeout_mutex);

			now = time(NULL);