1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

ssl_client2: allow reconnecting twice

This commit is contained in:
Manuel Pégourié-Gonnard
2013-08-02 15:04:36 +02:00
committed by Paul Bakker
parent 593058e35e
commit cf2e97eae2

View File

@ -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 );