[vlc-commits] tls: Abort the session creation early in case of interruption

Hugo Beauzée-Luyssen git at videolan.org
Fri Nov 3 17:03:30 CET 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Nov  2 13:57:42 2017 +0100| [787c2af8caec62faa39592cac676379278996a60] | committer: Hugo Beauzée-Luyssen

tls: Abort the session creation early in case of interruption

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=787c2af8caec62faa39592cac676379278996a60
---

 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;



More information about the vlc-commits mailing list