1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine resource manager, fix loop and context switching bug

This commit is contained in:
winlin 2020-09-20 22:09:03 +08:00
parent 033e2f9210
commit 1a33452e95
3 changed files with 93 additions and 2 deletions

View file

@ -64,6 +64,7 @@ private:
std::vector<ISrsDisposingHandler*> handlers_;
// The zombie connections, we will delete it asynchronously.
std::vector<ISrsResource*> zombies_;
std::vector<ISrsResource*>* p_disposing_;
private:
// The connections without any id.
std::vector<ISrsResource*> conns_;
@ -96,6 +97,7 @@ public:
virtual void remove(ISrsResource* c);
private:
void clear();
void do_clear();
void dispose(ISrsResource* c);
};