mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2026-01-27 02:23:02 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -76,13 +76,17 @@ namespace OpenWifi {
|
||||
}
|
||||
|
||||
AP_WS_Connection::~AP_WS_Connection() {
|
||||
poco_information(Logger_, fmt::format("DESTRUCTOR({}): Session={} Connection closed.", SerialNumber_,
|
||||
poco_information(Logger_, fmt::format("DESTRUCTOR({}): 0 - Session={} Connection closed.", SerialNumber_,
|
||||
State_.sessionId));
|
||||
std::lock_guard G(ConnectionMutex_);
|
||||
EndConnection();
|
||||
poco_information(Logger_, fmt::format("DESTRUCTOR({}): 1 - Session={} Connection closed.", SerialNumber_,
|
||||
State_.sessionId));
|
||||
EndConnection(false);
|
||||
poco_information(Logger_, fmt::format("DESTRUCTOR({}): 2 - Session={} Connection closed.", SerialNumber_,
|
||||
State_.sessionId));
|
||||
}
|
||||
|
||||
void AP_WS_Connection::EndConnection() {
|
||||
void AP_WS_Connection::EndConnection(bool Clean) {
|
||||
bool expectedValue=false;
|
||||
if (Dead_.compare_exchange_strong(expectedValue,true,std::memory_order_release,std::memory_order_relaxed)) {
|
||||
|
||||
@@ -110,7 +114,8 @@ namespace OpenWifi {
|
||||
Cleanup.detach();
|
||||
}
|
||||
|
||||
AP_WS_Server()->EndSession(State_.sessionId, SerialNumberInt_);
|
||||
if(Clean)
|
||||
AP_WS_Server()->EndSession(State_.sessionId, SerialNumberInt_);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace OpenWifi {
|
||||
Poco::Logger &L, std::pair<Poco::Net::SocketReactor *, LockedDbSession *> R);
|
||||
~AP_WS_Connection();
|
||||
|
||||
void EndConnection();
|
||||
void EndConnection(bool Clean = true);
|
||||
void ProcessJSONRPCEvent(Poco::JSON::Object::Ptr &Doc);
|
||||
void ProcessJSONRPCResult(Poco::JSON::Object::Ptr Doc);
|
||||
void ProcessIncomingFrame();
|
||||
|
||||
Reference in New Issue
Block a user