fix examples client DTLS resume

This commit is contained in:
toddouska 2012-08-17 12:43:36 -07:00
parent 925ddb6626
commit 4b8fdb4371

View File

@ -392,7 +392,8 @@ void client_test(void* args)
sslResume = CyaSSL_new(ctx);
#endif
CyaSSL_shutdown(ssl);
if (doDTLS == 0) /* don't send alert after "break" command */
CyaSSL_shutdown(ssl); /* echoserver will interpret as new conn */
CyaSSL_free(ssl);
CloseSocket(sockfd);
@ -404,7 +405,7 @@ void client_test(void* args)
sleep(1);
#endif
}
tcp_connect(&sockfd, host, port);
tcp_connect(&sockfd, host, port, doDTLS);
CyaSSL_set_fd(sslResume, sockfd);
CyaSSL_set_session(sslResume, session);