mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 11:41:44 +08:00
添加无人观看主动断开事件
This commit is contained in:
@@ -51,7 +51,7 @@ public:
|
||||
if(!media) {
|
||||
break;
|
||||
}
|
||||
if(!media->close()) {
|
||||
if(!media->close(true)) {
|
||||
break;
|
||||
}
|
||||
(*stream) << "\t踢出成功:"
|
||||
@@ -86,9 +86,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static onceToken s_token([]() {
|
||||
REGIST_CMD(media);
|
||||
}, nullptr);
|
||||
void installShellCMD(){
|
||||
static onceToken s_token([]() {
|
||||
REGIST_CMD(media);
|
||||
}, nullptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} /* namespace mediakit */
|
||||
@@ -33,7 +33,10 @@ using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
extern void installShellCMD();
|
||||
|
||||
ShellSession::ShellSession(const Socket::Ptr &_sock) : TcpSession(_sock) {
|
||||
installShellCMD();
|
||||
pleaseInputUser();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user