fixed: close the mpd socket and stop the mpd client thread before exiting
This commit is contained in:
parent
e4d40a807c
commit
3d365f0ea9
2 changed files with 6 additions and 1 deletions
|
@ -209,6 +209,9 @@ void CBitVis::Process()
|
||||||
}
|
}
|
||||||
|
|
||||||
m_jackclient.Disconnect();
|
m_jackclient.Disconnect();
|
||||||
|
m_mpdclient->StopThread();
|
||||||
|
delete m_mpdclient;
|
||||||
|
m_mpdclient = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CBitVis::ProcessSignalfd()
|
void CBitVis::ProcessSignalfd()
|
||||||
|
|
|
@ -35,13 +35,15 @@ void CMpdClient::Process()
|
||||||
if (!GetCurrentSong() || !GetPlayStatus())
|
if (!GetCurrentSong() || !GetPlayStatus())
|
||||||
{
|
{
|
||||||
m_socket.Close();
|
m_socket.Close();
|
||||||
USleep(10000000);
|
USleep(10000000, &m_stop);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
USleep(1000000);
|
USleep(1000000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_socket.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMpdClient::OpenSocket()
|
bool CMpdClient::OpenSocket()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue