Skip to content

Commit

Permalink
Don't populate TLS until we need it
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Dec 16, 2019
1 parent 862ad4c commit 78d0436
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/server/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ void vlog_request(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request,
* No output means no output.
*/
if (!log_dst) return;
if (!log_rdebug_enabled(lvl, request)) return;

/*
* Allocate a thread local, 4k pool so we don't
Expand All @@ -303,8 +304,6 @@ void vlog_request(fr_log_type_t type, fr_log_lvl_t lvl, REQUEST *request,

filename = log_dst->file;

if (!log_rdebug_enabled(lvl, request)) return;

/*
* Debug messages get treated specially.
*/
Expand Down

0 comments on commit 78d0436

Please sign in to comment.