Commit 296a16fa authored by louiz’'s avatar louiz’

Do not segfault when trying to send TLS data over a not-yet connected socket

parent 0620c8e5
......@@ -410,7 +410,9 @@ void TCPSocketHandler::tls_recv()
void TCPSocketHandler::tls_send(std::string&& data)
{
if (this->tls->is_active())
// We may not be connected yet, or the tls session has
// not yet been negociated
if (this->tls && this->tls->is_active())
{
const bool was_active = this->tls->is_active();
if (!this->pre_buf.empty())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment