diff options
author | Siri Hansen <[email protected]> | 2018-05-03 15:46:57 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2018-05-07 12:02:25 +0200 |
commit | d8e804043c6b4974943884cb15b86b40a5c870f1 (patch) | |
tree | cd1d2c4c0d2216788cfdb4f58ec8b72476241306 | |
parent | 3cef0524e4332ebf547180ec0d0feafe0a559b5c (diff) | |
download | otp-d8e804043c6b4974943884cb15b86b40a5c870f1.tar.gz otp-d8e804043c6b4974943884cb15b86b40a5c870f1.tar.bz2 otp-d8e804043c6b4974943884cb15b86b40a5c870f1.zip |
Don't crash logger_server due to unexpected message
-rw-r--r-- | lib/kernel/src/logger_server.erl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/kernel/src/logger_server.erl b/lib/kernel/src/logger_server.erl index 6ef3b8582a..052036b8d0 100644 --- a/lib/kernel/src/logger_server.erl +++ b/lib/kernel/src/logger_server.erl @@ -234,7 +234,13 @@ handle_info({log,Level,Report,Meta}, State) -> {noreply, State}; handle_info({Ref,_Reply},State) when is_reference(Ref) -> %% Assuming this is a timed-out gen_server reply - ignoring - {noreply, State}. + {noreply, State}; +handle_info(Unexpected,State) -> + ?LOG_INTERNAL(debug, + [{logger,got_unexpected_message}, + {process,?SERVER}, + {message,Unexpected}]), + {noreply,State}. terminate(_Reason, _State) -> ok. |