From cf2e97eae2b4a06ac68bc394d61114849c7d97d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= <mpg@elzevir.fr>
Date: Fri, 2 Aug 2013 15:04:36 +0200
Subject: [PATCH] ssl_client2: allow reconnecting twice

---
 programs/ssl/ssl_client2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c
index e8d38200c..9442dca23 100644
--- a/programs/ssl/ssl_client2.c
+++ b/programs/ssl/ssl_client2.c
@@ -354,7 +354,7 @@ int main( int argc, char *argv[] )
         else if( strcmp( p, "reconnect" ) == 0 )
         {
             opt.reconnect = atoi( q );
-            if( opt.reconnect < 0 || opt.reconnect > 1 )
+            if( opt.reconnect < 0 || opt.reconnect > 2 )
                 goto usage;
         }
         else if( strcmp( p, "min_version" ) == 0 )
@@ -818,7 +818,7 @@ send_request:
 
     if( opt.reconnect != 0 )
     {
-        opt.reconnect = 0;
+        --opt.reconnect;
 
         printf( "  . Reconnecting with saved session..." );
         fflush( stdout );