diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 59a86150a7..7ae71bdaf3 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -119,7 +119,7 @@ static int print_tls_error(URLContext *h, int ret) TLSContext *c = h->priv_data; if (h->flags & AVIO_FLAG_NONBLOCK) { int err = SSL_get_error(c->ssl, ret); - if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_READ) + if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) return AVERROR(EAGAIN); } av_log(h, AV_LOG_ERROR, "%s\n", ERR_error_string(ERR_get_error(), NULL));