aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/asio/asio_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/tls/asio/asio_stream.h')
-rw-r--r--src/lib/tls/asio/asio_stream.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/tls/asio/asio_stream.h b/src/lib/tls/asio/asio_stream.h
index e52684bfa..49b7510dd 100644
--- a/src/lib/tls/asio/asio_stream.h
+++ b/src/lib/tls/asio/asio_stream.h
@@ -379,6 +379,8 @@ class Stream : public StreamBase<Channel>
}
catch(const std::exception&)
{
+ // we can't be sure how many bytes were commited here, so clear the send_buffer and try again
+ this->m_core.clearSendBuffer();
Botan::TLS::AsyncWriteOperation<typename std::decay<WriteHandler>::type, Stream>
op{std::move(init.completion_handler),
*this,