mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix the export project bug. wakeup connection when dispose server.
This commit is contained in:
parent
969ed7b0ae
commit
1f1776a0d8
5 changed files with 65 additions and 17 deletions
|
@ -88,6 +88,7 @@ SrsRtmpConn::SrsRtmpConn(SrsServer* svr, st_netfd_t c)
|
|||
duration = 0;
|
||||
kbps = new SrsKbps();
|
||||
kbps->set_io(skt, skt);
|
||||
wakable = NULL;
|
||||
|
||||
mw_sleep = SRS_PERF_MW_SLEEP;
|
||||
mw_enabled = false;
|
||||
|
@ -110,6 +111,16 @@ SrsRtmpConn::~SrsRtmpConn()
|
|||
srs_freep(kbps);
|
||||
}
|
||||
|
||||
void SrsRtmpConn::dispose()
|
||||
{
|
||||
SrsConnection::dispose();
|
||||
|
||||
// wakeup the handler which need to notice.
|
||||
if (wakable) {
|
||||
wakable->wakeup();
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: return detail message when error for client.
|
||||
int SrsRtmpConn::do_cycle()
|
||||
{
|
||||
|
@ -597,7 +608,9 @@ int SrsRtmpConn::playing(SrsSource* source)
|
|||
}
|
||||
|
||||
// delivery messages for clients playing stream.
|
||||
wakable = consumer;
|
||||
ret = do_playing(source, consumer, &trd);
|
||||
wakable = NULL;
|
||||
|
||||
// stop isolate recv thread
|
||||
trd.stop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue