Skip to content

Commit

Permalink
fix #511, fix the bug of thread stop invalid.
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengfl authored and winlinvip committed Nov 5, 2015
1 parent 6d0adb9 commit 1dae8fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Empty file modified trunk/src/app/srs_app_edge.cpp
100644 → 100755
Empty file.
7 changes: 5 additions & 2 deletions trunk/src/app/srs_app_thread.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,12 @@ namespace internal {
return ret;
}

disposed = false;
// we set to loop to true for thread to run.
loop = true;

// wait for cid to ready, for parent thread to get the cid.
while (_cid < 0 && loop) {
while (_cid < 0) {
st_usleep(10 * 1000);
}

Expand All @@ -124,7 +125,9 @@ namespace internal {

dispose();

tid = NULL;
_cid = -1;
can_run = false;
tid = NULL;
}

bool SrsThread::can_loop()
Expand Down

0 comments on commit 1dae8fc

Please sign in to comment.