diff options
author | Ingela Anderton Andin <ingela@erlang.org> | 2022-02-21 16:16:50 +0100 |
---|---|---|
committer | Ingela Anderton Andin <ingela@erlang.org> | 2022-03-21 15:35:38 +0100 |
commit | 98b59284a2e25ee5d72cc2f4644d8736e1516621 (patch) | |
tree | 9a0b11ee94fab2440d2ed3b68a800b0706c257b2 /lib/ftp | |
parent | 0989706ac7ceb8236efc1e3c6eb1deff8c984645 (diff) | |
download | erlang-98b59284a2e25ee5d72cc2f4644d8736e1516621.tar.gz |
ftp: Ignore unexpected message
An unexpected timeout message on the FTP control channel was observed
in a real system and could not be associated with anything that was
expected to happen, so we will ignore but info log such unexpected
messages.
Diffstat (limited to 'lib/ftp')
-rw-r--r-- | lib/ftp/src/ftp.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl index 221eac3dac..fbbe49ddef 100644 --- a/lib/ftp/src/ftp.erl +++ b/lib/ftp/src/ftp.erl @@ -1615,7 +1615,6 @@ handle_ctrl_result({pos_compl, _}, #state{tls_upgrading_data_connection = {true, {noreply, State#state{client = undefined, caller = undefined, tls_upgrading_data_connection = false}}; - handle_ctrl_result({pos_compl, _}, #state{caller = open, client = From} = State) -> gen_server:reply(From, {ok, self()}), @@ -1952,7 +1951,10 @@ handle_ctrl_result({pos_prel, _}, #state{caller = {transfer_data, Bin}} %% Default handle_ctrl_result({Status, _Lines}, #state{client = From} = State) when From =/= undefined -> - ctrl_result_response(Status, State, {error, Status}). + ctrl_result_response(Status, State, {error, Status}); +handle_ctrl_result(CtrlMsg, #state{caller = undefined} = State) -> + logger:log(info, #{protocol => ftp, unexpected_msg => CtrlMsg}), + {noreply, State}. %%-------------------------------------------------------------------------- %% Help functions to handle_ctrl_result |