Remove unused virtual stop call

This commit is contained in:
badaix 2023-01-24 08:00:31 +01:00
parent 63de108800
commit 787d0714c0
2 changed files with 2 additions and 30 deletions

View file

@ -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