Commit e1fb3143 authored by Lukasz Marek's avatar Lukasz Marek

avformat/ftp: fix possible deadlock

Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki@gmail.com>
parent 7b1640c4
......@@ -486,14 +486,13 @@ static int ftp_abort(URLContext *h)
}
} else {
ftp_close_data_connection(s);
}
if (ftp_status(s, NULL, abor_codes) < 225) {
/* wu-ftpd also closes control connection after data connection closing */
ffurl_closep(&s->conn_control);
if ((err = ftp_connect_control_connection(h)) < 0) {
av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");
return err;
if (ftp_status(s, NULL, abor_codes) < 225) {
/* wu-ftpd also closes control connection after data connection closing */
ffurl_closep(&s->conn_control);
if ((err = ftp_connect_control_connection(h)) < 0) {
av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");
return err;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment