Permalink
Browse files

dont fail under high load

  • Loading branch information...
1 parent 9354955 commit 2017ed5c7b3f28479bf9d8b3927497625a530c7a @rdp committed Oct 3, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 source_code/acam/loopback-capture.cpp
@@ -387,8 +387,11 @@ HRESULT propagateBufferOnce() {
if((current_time - start_time > millis_to_fill)) {
// I don't think we ever get to here anymore...thankfully, since it's mostly broken code probably, anyway
if(!gotAnyAtAll) {
- // We get here [?]
- assert(false); // want to know if this ever happens...it never should since we are using silence...
+ // We get here under high load...
+ // ignore for now, but sleep more
+ ShowOutput("detected high amount of time without receiving a packet from the capturer!");
+ start_time = timeGetTime();
+ Sleep(0);
}
} else {
Sleep(1); // doesn't seem to hurt cpu--"sleep x ms"

0 comments on commit 2017ed5

Please sign in to comment.