MCPcopy Create free account
hub / github.com/apohl79/audiogridder / shutdown

Method shutdown

Server/Source/ProcessorClient.cpp:52–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52void ProcessorClient::shutdown() {
53 logln("shutting down sandbox");
54
55 signalThreadShouldExit();
56
57 {
58 std::lock_guard<std::mutex> lock(m_cmdMtx);
59
60 if (nullptr != m_sockCmdOut) {
61 if (m_sockCmdOut->isConnected()) {
62 m_sockCmdOut->close();
63 }
64 }
65
66 if (nullptr != m_sockCmdIn) {
67 if (m_sockCmdIn->isConnected()) {
68 m_sockCmdIn->close();
69 }
70 }
71
72 if (m_process.isRunning()) {
73 m_process.kill();
74 }
75 }
76
77 {
78 std::lock_guard<std::mutex> lock(m_audioMtx);
79
80 if (nullptr != m_sockAudio) {
81 if (m_sockAudio->isConnected()) {
82 m_sockAudio->close();
83 }
84 }
85 }
86}
87
88bool ProcessorClient::isOk() {
89 bool ok;

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected