[vlc-devel] [PATCH 3/5] tls: Abort the session creation early in case of interruption

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Nov 2 14:35:29 CET 2017


---
 src/network/tls.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/network/tls.c b/src/network/tls.c
index 1fae1d0e0f..48fba2e3e8 100644
--- a/src/network/tls.c
+++ b/src/network/tls.c
@@ -187,9 +187,10 @@ vlc_tls_t *vlc_tls_ClientSessionCreate(vlc_tls_creds_t *crd, vlc_tls_t *sock,
     vlc_cleanup_push (cleanup_tls, session);
     while ((val = crd->handshake(crd, session, host, service, alp)) != 0)
     {
-        if (val < 0)
+        if (val < 0 || vlc_killed() )
         {
-            msg_Err(crd, "TLS session handshake error");
+            if (val < 0)
+                msg_Err(crd, "TLS session handshake error");
 error:
             vlc_tls_SessionDelete (session);
             session = NULL;
-- 
2.11.0



More information about the vlc-devel mailing list