mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-29 18:27:12 +02:00
Possible Websocket fix
This commit is contained in:
parent
ee1a8dbc38
commit
ade2bc9bf7
1 changed files with 3 additions and 3 deletions
|
@ -313,8 +313,8 @@ void ControlSessionHttp::sendAsync(const std::string& message)
|
|||
if (!ws_)
|
||||
return;
|
||||
|
||||
strand_.post([ this, self = shared_from_this(), message ]() {
|
||||
messages_.emplace_back(message);
|
||||
strand_.post([ this, self = shared_from_this(), msg = message ]() {
|
||||
messages_.push_back(std::move(msg));
|
||||
if (messages_.size() > 1)
|
||||
{
|
||||
LOG(DEBUG) << "HTTP session outstanding async_writes: " << messages_.size() << "\n";
|
||||
|
@ -329,7 +329,7 @@ void ControlSessionHttp::send_next()
|
|||
if (!ws_)
|
||||
return;
|
||||
|
||||
auto message = messages_.front();
|
||||
const std::string& message = messages_.front();
|
||||
ws_->async_write(boost::asio::buffer(message),
|
||||
boost::asio::bind_executor(strand_, [ this, self = shared_from_this() ](std::error_code ec, std::size_t length) {
|
||||
messages_.pop_front();
|
||||
|
|
Loading…
Add table
Reference in a new issue