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) ...@@ -486,14 +486,13 @@ static int ftp_abort(URLContext *h)
} }
} else { } else {
ftp_close_data_connection(s); ftp_close_data_connection(s);
} if (ftp_status(s, NULL, abor_codes) < 225) {
/* wu-ftpd also closes control connection after data connection closing */
if (ftp_status(s, NULL, abor_codes) < 225) { ffurl_closep(&s->conn_control);
/* wu-ftpd also closes control connection after data connection closing */ if ((err = ftp_connect_control_connection(h)) < 0) {
ffurl_closep(&s->conn_control); av_log(h, AV_LOG_ERROR, "Reconnect failed.\n");
if ((err = ftp_connect_control_connection(h)) < 0) { return err;
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