diff --git a/trunk/src/app/srs_app_hybrid.cpp b/trunk/src/app/srs_app_hybrid.cpp index 0f285b4874a..0f6f6d438c8 100644 --- a/trunk/src/app/srs_app_hybrid.cpp +++ b/trunk/src/app/srs_app_hybrid.cpp @@ -232,6 +232,8 @@ void SrsHybridServer::stop() ISrsHybridServer* server = *it; server->stop(); } + + srs_st_destroy(); } SrsServerAdapter* SrsHybridServer::srs() diff --git a/trunk/src/protocol/srs_protocol_st.cpp b/trunk/src/protocol/srs_protocol_st.cpp index 73d2ed10ada..88a6470dcf4 100644 --- a/trunk/src/protocol/srs_protocol_st.cpp +++ b/trunk/src/protocol/srs_protocol_st.cpp @@ -70,6 +70,11 @@ srs_error_t srs_st_init() return srs_success; } +void srs_st_destroy(void) +{ + st_destroy(); +} + void srs_close_stfd(srs_netfd_t& stfd) { if (stfd) { diff --git a/trunk/src/protocol/srs_protocol_st.hpp b/trunk/src/protocol/srs_protocol_st.hpp index 5603f02e4ea..aa02839c986 100644 --- a/trunk/src/protocol/srs_protocol_st.hpp +++ b/trunk/src/protocol/srs_protocol_st.hpp @@ -19,8 +19,10 @@ typedef void* srs_thread_t; typedef void* srs_cond_t; typedef void* srs_mutex_t; -// Initialize st, requires epoll. +// Initialize ST, requires epoll for linux. extern srs_error_t srs_st_init(); +// Destroy ST, free resources for asan detecting. +extern void srs_st_destroy(void); // Close the netfd, and close the underlayer fd. // @remark when close, user must ensure io completed.