fixed: no need to lock if only checking for a closed socket
This commit is contained in:
parent
b129dcc2f8
commit
b7f56dfe4d
1 changed files with 1 additions and 2 deletions
|
@ -246,9 +246,9 @@ void CBitVis::Run()
|
|||
while ((msg = m_jackclient.GetMessage()) != MsgNone)
|
||||
LogDebug("got message %s from jack client", MsgToString(msg));
|
||||
|
||||
CLock lock(m_condition);
|
||||
if (!m_socket.IsOpen() && m_address && GetTimeUs() - lastconnect > CONNECTINTERVAL)
|
||||
{
|
||||
CLock lock(m_condition);
|
||||
if (m_socket.Open(m_address, m_port, 10000000) != SUCCESS)
|
||||
{
|
||||
LogError("Failed to connect: %s", m_socket.GetError().c_str());
|
||||
|
@ -260,7 +260,6 @@ void CBitVis::Run()
|
|||
}
|
||||
didconnect = true;
|
||||
}
|
||||
lock.Leave();
|
||||
|
||||
if (didconnect)
|
||||
lastconnect = GetTimeUs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue