mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix bug #162, requires epoll. 0.9.222
This commit is contained in:
parent
967de9d2e7
commit
b830b995e6
5 changed files with 54 additions and 13 deletions
|
@ -528,20 +528,11 @@ int SrsServer::initialize_st()
|
|||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
// use linux epoll.
|
||||
if (st_set_eventsys(ST_EVENTSYS_ALT) == -1) {
|
||||
ret = ERROR_ST_SET_EPOLL;
|
||||
srs_error("st_set_eventsys use linux epoll failed. ret=%d", ret);
|
||||
// init st
|
||||
if ((ret = srs_init_st()) != ERROR_SUCCESS) {
|
||||
srs_error("init st failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_verbose("st_set_eventsys use linux epoll success");
|
||||
|
||||
if(st_init() != 0){
|
||||
ret = ERROR_ST_INITIALIZE;
|
||||
srs_error("st_init failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
srs_verbose("st_init success");
|
||||
|
||||
// @remark, st alloc segment use mmap, which only support 32757 threads,
|
||||
// if need to support more, for instance, 100k threads, define the macro MALLOC_STACK.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue