diff --git a/src/cpp/websocketpp/src/connection.hpp b/src/cpp/websocketpp/src/connection.hpp index a216059551..53f37a559e 100644 --- a/src/cpp/websocketpp/src/connection.hpp +++ b/src/cpp/websocketpp/src/connection.hpp @@ -1225,7 +1225,9 @@ public: alog()->at(log::alevel::DEBUG_CLOSE) << "Exit after inturrupt" << log::endl; terminate(false); - } + } else { + m_handler->on_send_empty(type::shared_from_this()); + } } } @@ -1267,7 +1269,7 @@ public: if (m_write_queue.size() == 0) { alog()->at(log::alevel::DEBUG_CLOSE) << "handle_write called with empty queue" << log::endl; - return; + return; } m_write_buffer -= m_write_queue.front()->get_payload().size(); diff --git a/src/cpp/websocketpp/src/roles/server.hpp b/src/cpp/websocketpp/src/roles/server.hpp index e256a5d44c..270a478a0e 100644 --- a/src/cpp/websocketpp/src/roles/server.hpp +++ b/src/cpp/websocketpp/src/roles/server.hpp @@ -189,6 +189,8 @@ public: virtual void on_pong(connection_ptr con,std::string) {} virtual void on_pong_timeout(connection_ptr con,std::string) {} virtual void http(connection_ptr con) {} + + virtual void on_send_empty(connection_ptr con) {} }; server(boost::asio::io_service& m)