Skip to content

Commit

Permalink
chore: detach cleanup thread
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed Jun 18, 2024
1 parent dddf797 commit 431824a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@
#include <stdbool.h>
#include <sys/syslog.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

pthread_rwlock_t cacheLock;

struct cache *not_http_dst_cache;
struct cache *not_http_dst_cache = NULL;
static int check_interval;

_Noreturn static void check_cache() {
Expand Down Expand Up @@ -47,6 +50,8 @@ void init_not_http_cache(const int interval) {
exit(EXIT_FAILURE);
}
syslog(LOG_INFO, "Cleanup thread created");

pthread_detach(cleanup_thread);
}

bool cache_contains(struct addr_port target) {
Expand Down

0 comments on commit 431824a

Please sign in to comment.