mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 07:36:41 +02:00
Fix warning
This commit is contained in:
parent
149c2ae9a2
commit
a7baec9373
2 changed files with 5 additions and 4 deletions
|
@ -591,7 +591,8 @@ void Server::onMessageReceived(std::shared_ptr<ControlSession> controlSession, c
|
|||
}
|
||||
else if (entity->is_batch())
|
||||
{
|
||||
/// Attention: this will only work as long as the response handler in processRequest is called synchronously.
|
||||
/// Attention: this will only work as long as the response handler in processRequest is called synchronously. One way to do this is to remove the outer
|
||||
/// loop and to call the next processRequest with
|
||||
/// This is true for volume changes, which is the only batch request, but not for Control commands!
|
||||
jsonrpcpp::batch_ptr batch = dynamic_pointer_cast<jsonrpcpp::Batch>(entity);
|
||||
////cout << "Batch: " << batch->to_json().dump() << "\n";
|
||||
|
@ -602,8 +603,8 @@ void Server::onMessageReceived(std::shared_ptr<ControlSession> controlSession, c
|
|||
if (batch_entity->is_request())
|
||||
{
|
||||
jsonrpcpp::request_ptr request = dynamic_pointer_cast<jsonrpcpp::Request>(batch_entity);
|
||||
processRequest(request, [this, controlSession, response_handler, &responseBatch, ¬ificationBatch](jsonrpcpp::entity_ptr response,
|
||||
jsonrpcpp::notification_ptr notification) {
|
||||
processRequest(request, [controlSession, response_handler, &responseBatch, ¬ificationBatch](jsonrpcpp::entity_ptr response,
|
||||
jsonrpcpp::notification_ptr notification) {
|
||||
if (response != nullptr)
|
||||
responseBatch.add_ptr(response);
|
||||
if (notification != nullptr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue