tls_openssl: Fix checks for SSL_ERROR_WANT_WRITE in nonblocking operation
authorMartin Storsjö <martin@martin.st>
Thu, 16 Aug 2018 07:55:41 +0000 (09:55 +0200)
committerMartin Storsjö <martin@martin.st>
Fri, 17 Aug 2018 10:08:28 +0000 (13:08 +0300)
This was a typo in 0671eb2346c, spotted by Chris Carroux.

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/tls_openssl.c

index f0b325a..4a2fcfd 100644 (file)
@@ -112,7 +112,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));