aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/tls_client.cpp5
1 files changed, 2 insertions, 3 deletions
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);