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
|
@ -61,7 +61,7 @@ SrsRecvThread::SrsRecvThread(ISrsMessagePumper* p, SrsRtmpServer* r, int tm)
|
|||
rtmp = r;
|
||||
pumper = p;
|
||||
timeout = tm;
|
||||
trd = NULL;
|
||||
trd = new SrsDummyCoroutine();
|
||||
}
|
||||
|
||||
SrsRecvThread::~SrsRecvThread()
|
||||
|
@ -77,7 +77,7 @@ int SrsRecvThread::cid()
|
|||
int SrsRecvThread::start()
|
||||
{
|
||||
srs_freep(trd);
|
||||
trd = new SrsCoroutine("recv", this);
|
||||
trd = new SrsSTCoroutine("recv", this);
|
||||
return trd->start();
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ SrsHttpRecvThread::SrsHttpRecvThread(SrsResponseOnlyHttpConn* c)
|
|||
{
|
||||
conn = c;
|
||||
error = ERROR_SUCCESS;
|
||||
trd = new SrsCoroutine("http-receive", this, _srs_context->get_id());
|
||||
trd = new SrsSTCoroutine("http-receive", this, _srs_context->get_id());
|
||||
}
|
||||
|
||||
SrsHttpRecvThread::~SrsHttpRecvThread()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue