X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Ftls_gnutls.c;h=f32bc2821b8e48290a17513f1ce7a69ba22beac6;hb=5f64f6058e0c23641a68ce7dfe47b1f55efd401c;hp=e3c43683be57a9b9a31062227946c6d7e2ee592e;hpb=47e12966b75490cfa5fb8ed65a48a9a3d84a7bce;p=ffmpeg diff --git a/libavformat/tls_gnutls.c b/libavformat/tls_gnutls.c index e3c43683be5..f32bc2821b8 100644 --- a/libavformat/tls_gnutls.c +++ b/libavformat/tls_gnutls.c @@ -182,11 +182,13 @@ static int tls_open(URLContext *h, const char *uri, int flags, AVDictionary **op gnutls_transport_set_push_function(p->session, gnutls_url_push); gnutls_transport_set_ptr(p->session, c->tcp); gnutls_priority_set_direct(p->session, "NORMAL", NULL); - ret = gnutls_handshake(p->session); - if (ret) { - ret = print_tls_error(h, ret); - goto fail; - } + do { + ret = gnutls_handshake(p->session); + if (gnutls_error_is_fatal(ret)) { + ret = print_tls_error(h, ret); + goto fail; + } + } while (ret); p->need_shutdown = 1; if (c->verify) { unsigned int status, cert_list_size;