mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-27 16:06:15 +02:00
send messages async
This commit is contained in:
parent
b01e3fe549
commit
a6993f11df
4 changed files with 34 additions and 26 deletions
|
@ -176,10 +176,10 @@ void ClientConnection::getNextMessage()
|
|||
// logD << "getNextMessage: " << baseMessage.type << ", size: " << baseMessage.size << ", id: " << baseMessage.id << ", refers: " << baseMessage.refersTo << "\n";
|
||||
if (baseMessage.size > buffer.size())
|
||||
buffer.resize(baseMessage.size);
|
||||
{
|
||||
std::lock_guard<std::mutex> socketLock(socketMutex_);
|
||||
socketRead(&buffer[0], baseMessage.size);
|
||||
}
|
||||
// {
|
||||
// std::lock_guard<std::mutex> socketLock(socketMutex_);
|
||||
socketRead(&buffer[0], baseMessage.size);
|
||||
// }
|
||||
tv t;
|
||||
baseMessage.received = t;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue