Move logic from StreamServer into new Server class

This commit is contained in:
badaix 2020-07-20 11:54:58 +02:00
parent bd19c51d58
commit d52015ff09
11 changed files with 912 additions and 713 deletions

View file

@ -49,13 +49,13 @@ void ControlSessionWebsocket::start()
void ControlSessionWebsocket::stop()
{
if (ws_.is_open())
{
boost::beast::error_code ec;
ws_.close(beast::websocket::close_code::normal, ec);
if (ec)
LOG(ERROR, LOG_TAG) << "Error in socket close: " << ec.message() << "\n";
}
// if (ws_.is_open())
// {
// boost::beast::error_code ec;
// ws_.close(beast::websocket::close_code::normal, ec);
// if (ec)
// LOG(ERROR, LOG_TAG) << "Error in socket close: " << ec.message() << "\n";
// }
}