Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

waiting if to while..

  • Loading branch information...
commit d727eff999905d5f11dd865f7003cee79804179c 1 parent c4442f9
@RJ authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 includes/playdar/ss_curl.hpp
View
6 includes/playdar/ss_curl.hpp
@@ -67,7 +67,7 @@ class CurlStreamingStrategy : public StreamingStrategy
}
do{
boost::mutex::scoped_lock lk(m_mut);
- if( m_buffers.size()==0 && !m_curl_finished )
+ while( m_buffers.size()==0 && !m_curl_finished )
{
//cout << "Waiting on curl.." << endl;
m_cond.wait(lk);
@@ -119,7 +119,7 @@ class CurlStreamingStrategy : public StreamingStrategy
inst->m_buffers.push_front( c );
}
}
- inst->m_cond.notify_one();
+ inst->m_cond.notify_all();
return len;
}
@@ -138,7 +138,7 @@ class CurlStreamingStrategy : public StreamingStrategy
m_curlres = curl_easy_perform( m_curl );
m_curl_finished = true;
cout << "curl_perform done. ret: " << m_curlres << " bytes rcvd: " << m_bytesreceived << endl;
- m_cond.notify_one();
+ m_cond.notify_all();
if(m_curlres != 0) cout << "Curl error: " << m_curlerror << endl;
curl_easy_cleanup( m_curl );
}
Please sign in to comment.
Something went wrong with that request. Please try again.