mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 23:56:43 +02:00
Remove unused virtual stop call
This commit is contained in:
parent
63de108800
commit
787d0714c0
2 changed files with 2 additions and 30 deletions
|
@ -47,11 +47,6 @@ StreamControl::StreamControl(const boost::asio::any_io_executor& executor) : exe
|
|||
}
|
||||
|
||||
|
||||
StreamControl::~StreamControl()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
|
||||
void StreamControl::start(const std::string& stream_id, const ServerSettings& server_setttings, const OnNotification& notification_handler,
|
||||
const OnRequest& request_handler, const OnLog& log_handler)
|
||||
|
@ -78,10 +73,6 @@ void StreamControl::command(const jsonrpcpp::Request& request, const OnResponse&
|
|||
}
|
||||
|
||||
|
||||
void StreamControl::stop()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void StreamControl::onReceive(const std::string& json)
|
||||
{
|
||||
|
@ -157,6 +148,7 @@ ScriptStreamControl::ScriptStreamControl(const boost::asio::any_io_executor& exe
|
|||
}
|
||||
|
||||
|
||||
|
||||
void ScriptStreamControl::doStart(const std::string& stream_id, const ServerSettings& server_setttings)
|
||||
{
|
||||
pipe_stderr_ = bp::pipe();
|
||||
|
@ -248,21 +240,4 @@ void ScriptStreamControl::stdoutReadLine()
|
|||
}
|
||||
|
||||
|
||||
|
||||
void ScriptStreamControl::stop()
|
||||
{
|
||||
if (process_.running())
|
||||
{
|
||||
LOG(INFO, LOG_TAG) << "Stopping script '" << script_ << "'\n";
|
||||
::kill(-process_.native_handle(), SIGINT);
|
||||
auto timeout = 500ms;
|
||||
if (!process_.wait_for(timeout))
|
||||
{
|
||||
LOG(INFO, LOG_TAG) << "Script did not terminate after " << timeout.count() << " ms, terminating.\n";
|
||||
process_.terminate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace streamreader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue