diff --git a/tests/test_pusher.cpp b/tests/test_pusher.cpp index 836cf382..cb2efea6 100644 --- a/tests/test_pusher.cpp +++ b/tests/test_pusher.cpp @@ -103,6 +103,8 @@ int domain(const string &playUrl, const string &pushUrl) { static semaphore sem; signal(SIGINT, [](int) { sem.post(); });// 设置退出信号 sem.wait(); + pusher.reset(); + g_timer.reset(); return 0; } diff --git a/tests/test_pusherMp4.cpp b/tests/test_pusherMp4.cpp index 89ae36de..d67ac45a 100644 --- a/tests/test_pusherMp4.cpp +++ b/tests/test_pusherMp4.cpp @@ -103,8 +103,9 @@ int domain(const string & filePath,const string & pushUrl){ //app必须record,filePath(流id)为相对于httpRoot/record的路径,否则MediaReader会找到不该文件 //限制app为record是为了防止服务器上的文件被肆意访问 createPusher(FindField(pushUrl.data(), nullptr,"://"),DEFAULT_VHOST,appName,filePath,pushUrl); - sem.wait(); + pusher.reset(); + g_timer.reset(); return 0; }