mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
ssl_client2: allow reconnecting twice
This commit is contained in:
committed by
Paul Bakker
parent
593058e35e
commit
cf2e97eae2
@ -354,7 +354,7 @@ int main( int argc, char *argv[] )
|
|||||||
else if( strcmp( p, "reconnect" ) == 0 )
|
else if( strcmp( p, "reconnect" ) == 0 )
|
||||||
{
|
{
|
||||||
opt.reconnect = atoi( q );
|
opt.reconnect = atoi( q );
|
||||||
if( opt.reconnect < 0 || opt.reconnect > 1 )
|
if( opt.reconnect < 0 || opt.reconnect > 2 )
|
||||||
goto usage;
|
goto usage;
|
||||||
}
|
}
|
||||||
else if( strcmp( p, "min_version" ) == 0 )
|
else if( strcmp( p, "min_version" ) == 0 )
|
||||||
@ -818,7 +818,7 @@ send_request:
|
|||||||
|
|
||||||
if( opt.reconnect != 0 )
|
if( opt.reconnect != 0 )
|
||||||
{
|
{
|
||||||
opt.reconnect = 0;
|
--opt.reconnect;
|
||||||
|
|
||||||
printf( " . Reconnecting with saved session..." );
|
printf( " . Reconnecting with saved session..." );
|
||||||
fflush( stdout );
|
fflush( stdout );
|
||||||
|
Reference in New Issue
Block a user