summaryrefslogtreecommitdiff
path: root/lib/ftp
diff options
context:
space:
mode:
authorMagnus Fröberg <magnus@klarna.com>2019-10-24 14:42:02 +0200
committerHans Nilsson <hans@erlang.org>2019-10-29 18:13:08 +0100
commitdc4ce32218f34e850bc0e91da741f8e4520c8862 (patch)
tree355a3306475bc7085ac2b73e6e63efe6b7bd8878 /lib/ftp
parentd0389a71bf302e2fd9487c1328ec0a5f33169639 (diff)
downloaderlang-dc4ce32218f34e850bc0e91da741f8e4520c8862.tar.gz
ftp: Fix infinite ctrl_data loop
The previous fix was insufficient, not using the updated state for the recursive call.
Diffstat (limited to 'lib/ftp')
-rw-r--r--lib/ftp/src/ftp.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ftp/src/ftp.erl b/lib/ftp/src/ftp.erl
index e9be7b8ff7..267922bc6d 100644
--- a/lib/ftp/src/ftp.erl
+++ b/lib/ftp/src/ftp.erl
@@ -1401,8 +1401,9 @@ handle_info({Transport, Socket, Data}, #state{csock = {Transport, Socket},
end;
{continue, NewCtrlData} when NewCtrlData =/= CtrlData ->
?DBG(' ...Continue... ctrl_data=~p~n',[NewCtrlData]),
- State = activate_ctrl_connection(State0),
- {noreply, State#state{ctrl_data = NewCtrlData}};
+ State1 = State0#state{ctrl_data = NewCtrlData},
+ State = activate_ctrl_connection(State1),
+ {noreply, State};
{continue, NewCtrlData} when NewCtrlData == CtrlData ->
?DBG(' ...Continue... ctrl_data=~p~n',[NewCtrlData]),
{noreply, State0}