mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Fix #908, use empty coroutine to avoid NULL pointer.
This commit is contained in:
parent
0e9e1792fe
commit
9ca36970aa
17 changed files with 115 additions and 41 deletions
|
@ -365,7 +365,7 @@ SrsKafkaProducer::SrsKafkaProducer()
|
|||
metadata_expired = srs_cond_new();
|
||||
|
||||
lock = srs_mutex_new();
|
||||
trd = NULL;
|
||||
trd = new SrsDummyCoroutine();
|
||||
worker = new SrsAsyncCallWorker();
|
||||
cache = new SrsKafkaCache();
|
||||
|
||||
|
@ -410,7 +410,7 @@ int SrsKafkaProducer::start()
|
|||
}
|
||||
|
||||
srs_freep(trd);
|
||||
trd = new SrsCoroutine("kafka", this, _srs_context->get_id());
|
||||
trd = new SrsSTCoroutine("kafka", this, _srs_context->get_id());
|
||||
if ((ret = trd->start()) != ERROR_SUCCESS) {
|
||||
srs_error("start kafka thread failed. ret=%d", ret);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue