V0.12
This commit is contained in:
parent
0364bfd97d
commit
8459eba2d6
@ -86,3 +86,15 @@ TaskInfo * TaskInfo::getData(const int TaskID) {
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void TaskInfo::StopAll() {
|
||||
for (const auto &task : TaskInfoMap) {
|
||||
const auto taskInfo = getData(task.second->TaskID);
|
||||
if (taskInfo) {
|
||||
if (taskInfo->Type == 0 && taskInfo->pushFlowTask) {
|
||||
taskInfo->pushFlowTask->stop();
|
||||
}
|
||||
}
|
||||
Stop(task.second->TaskID);
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ public:
|
||||
static void Start(TaskInfo* taskInfo);
|
||||
static void Stop(int TaskID);
|
||||
static TaskInfo* getData(int TaskID);
|
||||
static void StopAll();
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -73,17 +73,13 @@ public:
|
||||
if(Terms.IsContains(TID)){
|
||||
return;
|
||||
}
|
||||
if(NotificationTerminal(TID, Command)){
|
||||
Terms.Put(TID,TID);
|
||||
}
|
||||
Terms.Put(TID,TID);
|
||||
}
|
||||
void RemoveTerm(const int TID,const CTL::ByteArray& Command){
|
||||
if(!Terms.IsContains(TID)){
|
||||
return;
|
||||
}
|
||||
if(NotificationTerminal(TID, Command)){
|
||||
Terms.Remove(TID);
|
||||
}
|
||||
Terms.Remove(TID);
|
||||
}
|
||||
static bool NotificationTerminal(const int TID,const CTL::ByteArray& Command){
|
||||
auto Term = Terminal::getData(TID);
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
#include "ConnectionService.h"
|
||||
|
||||
#include "BS_Log.h"
|
||||
#include "Config.h"
|
||||
#include "PortService/ByteTool.h"
|
||||
#include "PortService/DataPacket.h"
|
||||
#include "PortService/Routing.h"
|
||||
#include "Task/TaskInfo.h"
|
||||
|
||||
CTL::WebSocketClient * ConnectionService::getSocket() {
|
||||
return &m_socket;
|
||||
@ -25,6 +27,8 @@ void ConnectionService::OnOpen(CTL::WebSocketInfo &info) {
|
||||
|
||||
void ConnectionService::Close(CTL::WebSocketInfo &info) {
|
||||
m_info = nullptr;
|
||||
BS_Log::Log("ConnectService Close");
|
||||
TaskInfo::StopAll();
|
||||
}
|
||||
|
||||
void ConnectionService::Register() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user