mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 16:16:42 +02:00
Don't send old PCM chunks to the client
This commit is contained in:
parent
30a88602dc
commit
0cc2c39357
5 changed files with 48 additions and 4 deletions
|
@ -137,11 +137,12 @@ void ControlServer::handleAccept(socket_ptr socket)
|
|||
setsockopt(socket->native(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
|
||||
setsockopt(socket->native(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
|
||||
logS(kLogNotice) << "ControlServer::NewConnection: " << socket->remote_endpoint().address().to_string() << endl;
|
||||
ServerSession* session = new ServerSession(this, socket);
|
||||
shared_ptr<ServerSession> session(new ServerSession(this, socket));
|
||||
{
|
||||
std::unique_lock<std::mutex> mlock(mutex_);
|
||||
session->setBufferMs(settings_.bufferMs);
|
||||
session->start();
|
||||
sessions_.insert(shared_ptr<ServerSession>(session));
|
||||
sessions_.insert(session);
|
||||
}
|
||||
startAccept();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue