mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-29 18:27:12 +02:00
Retry reading metadata on bad file descriptor
This commit is contained in:
parent
51445f6340
commit
0168bb17ab
1 changed files with 9 additions and 1 deletions
|
@ -240,9 +240,17 @@ void AirplayStream::pipeReadLine()
|
|||
<< "\n";
|
||||
wait(pipe_open_timer_, 2500ms, [this] { pipeReadLine(); });
|
||||
}
|
||||
if (ec.value() == boost::asio::error::bad_descriptor)
|
||||
{
|
||||
// If shairport-sync has not finished setting up the pipe, bad file descriptor is returned.
|
||||
// retry in a few seconds
|
||||
LOG(INFO, LOG_TAG) << "Waiting for metadata, retrying in 2500ms"
|
||||
<< "\n";
|
||||
wait(pipe_open_timer_, 2500ms, [this] { pipeReadLine(); });
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG(ERROR, LOG_TAG) << "Error while reading from metadata pipe: " << ec.message() << "\n";
|
||||
LOG(ERROR, LOG_TAG) << "Error while reading from metadata pipe: " << ec.category().name() << "\n" << ec.value() << ":\t" << ec.message() << "\n";
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue