Skip to content

Commit

Permalink
ftp: Solve possible race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
IngelaAndin committed Jun 4, 2024
1 parent d379b56 commit 363d16c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ftp/src/ftp_internal.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,10 @@ handle_ctrl_result({pos_compl, _}, #state{caller = {recv_bin, Data},
close_data_connection(State),
{noreply, State#state{client = undefined, caller = undefined}};

handle_ctrl_result({pos_compl, _}, #state{caller = recv_bin} = State0) ->
State = activate_data_connection(State0),
{noreply, State};

handle_ctrl_result({Status, _}, #state{caller = recv_bin} = State) ->
close_data_connection(State),
ctrl_result_response(Status, State#state{dsock = undefined},
Expand Down

0 comments on commit 363d16c

Please sign in to comment.