diff options
author | Tim Oesterreich <[email protected]> | 2019-03-06 17:09:37 +0100 |
---|---|---|
committer | Hannes Rantzsch <[email protected]> | 2019-04-16 10:48:14 +0200 |
commit | fb373394350cbe4f04d6958ffa8f33882f690b1e (patch) | |
tree | e40b6cc5c3f477f45ba9a95ec0636b930e3f7cd5 /src/lib/tls/asio/asio_stream.h | |
parent | b1acdbfe4f6ed49691dc16e74bd8906bedf3c625 (diff) |
async_write_some returns amount of bytes commited to the core, instead of bytes sent on the wire; do not use boost::asio::async_read/write
Diffstat (limited to 'src/lib/tls/asio/asio_stream.h')
-rw-r--r-- | src/lib/tls/asio/asio_stream.h | 2 |
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, |