diff --git a/autobahn/wamp_session.ipp b/autobahn/wamp_session.ipp index 842a860f..73e49761 100644 --- a/autobahn/wamp_session.ipp +++ b/autobahn/wamp_session.ipp @@ -1320,10 +1320,14 @@ inline void wamp_session::send_message(wamp_message&& message, bool session_esta throw protocol_error("session not running"); } - if (!m_transport) { + if (!m_transport) { throw no_transport_error(); } + if (!m_transport->is_connected()) { + throw no_transport_error(); + } + if (session_established && !m_session_id) { throw no_session_error(); }