mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
refine
This commit is contained in:
parent
bafdd83122
commit
2317f0e767
1 changed files with 6 additions and 8 deletions
|
@ -198,13 +198,7 @@ bool SrsQueueRecvThread::can_handle()
|
|||
// for the message may cause the thread to stop,
|
||||
// when stop, the thread is freed, so the messages
|
||||
// are dropped.
|
||||
bool e = empty();
|
||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||
if (_consumer && !e) {
|
||||
_consumer->on_dispose();
|
||||
}
|
||||
#endif
|
||||
return e;
|
||||
return empty();
|
||||
}
|
||||
|
||||
int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
|
||||
|
@ -212,7 +206,11 @@ int SrsQueueRecvThread::handle(SrsCommonMessage* msg)
|
|||
// put into queue, the send thread will get and process it,
|
||||
// @see SrsRtmpConn::process_play_control_msg
|
||||
queue.push_back(msg);
|
||||
|
||||
#ifdef SRS_PERF_QUEUE_COND_WAIT
|
||||
if (_consumer) {
|
||||
_consumer->on_dispose();
|
||||
}
|
||||
#endif
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue