Skip to content

Commit

Permalink
Throw if transport not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
Denis Zabavchik authored and Denis Zabavchik committed Apr 19, 2017
1 parent 0dc11ee commit e2d4c81
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autobahn/wamp_session.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit e2d4c81

Please sign in to comment.