aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2018-09-11 14:11:29 +0200
committerSiri Hansen <[email protected]>2018-09-12 14:58:02 +0200
commit7140fe7679c1ea0862961d2fc34f9d8283c04ca3 (patch)
tree0d53357893c981fd6ec5068f15cde765186c8fb5 /lib/kernel
parenta98ffe831d2a1cf44d0b7c53e2d72ade9d5a3dbb (diff)
downloadotp-7140fe7679c1ea0862961d2fc34f9d8283c04ca3.tar.gz
otp-7140fe7679c1ea0862961d2fc34f9d8283c04ca3.tar.bz2
otp-7140fe7679c1ea0862961d2fc34f9d8283c04ca3.zip
[logger] Check for deadlock when removing filters
If a filter fails, it is removed by a call to logger:remove_filter/1,2. If the log event that caused the failure was issued on the logger process itself, this would earlier cause a deadlock due to a gen_server:call to self(). This is now prevented.
Diffstat (limited to 'lib/kernel')
-rw-r--r--lib/kernel/src/logger_server.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/kernel/src/logger_server.erl b/lib/kernel/src/logger_server.erl
index e3827c6475..a1d40f1123 100644
--- a/lib/kernel/src/logger_server.erl
+++ b/lib/kernel/src/logger_server.erl
@@ -319,6 +319,7 @@ call(Request) ->
case get(?LOGGER_SERVER_TAG) of
true when
Action == add_handler; Action == remove_handler;
+ Action == add_filter; Action == remove_filter;
Action == update_config; Action == set_config ->
{error,{attempting_syncronous_call_to_self,Request}};
_ ->