Open
Description
Hi,
It seems std::string const & connection<config>::get_origin()
may try to call a member function of nullptr (websocketpp\impl\connection_impl.hpp, line 67):
return m_processor->get_origin(m_request);
Several times I've got an "Access Violation" message due to the fact that m_processor
is nullptr.
Why not to check m_processor
before calling get_origin(m_request)
?
I mean something like:
if (m_processor) return m_processor->get_origin(m_request);
else return string();
or
if (m_processor) return m_processor->get_origin(m_request);
else throw some_specific_exception();
Or maybe I'm just using it wrong?
My usage:
if (!hdl.expired())
{
try
{
return server.get_con_from_hdl(hdl)->get_origin();
}
catch (std::exception& ex)
{
//Process exception
}
}