From 3a97773e0e56a7568cc11821fb347fed3fdb7b92 Mon Sep 17 00:00:00 2001 From: lloyd Date: Sat, 28 Jul 2012 22:24:55 +0000 Subject: OpenSSL gets cranky if we send application data mid handshake --- doc/examples/tls_client.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/examples') diff --git a/doc/examples/tls_client.cpp b/doc/examples/tls_client.cpp index 5373227ce..efd5e068c 100644 --- a/doc/examples/tls_client.cpp +++ b/doc/examples/tls_client.cpp @@ -200,9 +200,8 @@ void doit(RandomNumberGenerator& rng, { std::cout << "Client initiated renegotiation\n"; client.renegotiate((buf[0] == 'R')); - } - - if(buf[0] == 'H') + } + else if(buf[0] == 'H') client.heartbeat(&buf[1], got-1); else client.send(buf, got); -- cgit v1.2.3