avformat/ftp: fix possible deadlock
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
This commit is contained in:
parent
7b1640c4a6
commit
e1fb3143bb
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user