When the handle is destroying, the session information of the DebugPort
has to be removed.
Change-Id: I6c931b889261d4d5374ac89775c2b50a1c6ad483
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Proxy::~Proxy() {
std::lock_guard<std::recursive_mutex> lock(GetMutex());
_D("Proxy::~Proxy()");
+ if (main_port_.get() != nullptr)
+ DebugPort::GetInst()->RemoveSession(main_port_->GetFd());
+
listener_ = nullptr;
UnsetIdler();
UnsetConnTimer();
Stub::~Stub() {
std::lock_guard<std::recursive_mutex> lock(GetMutex());
_D("Stub::~Stub");
+ for (auto& p : ports_) {
+ if (!p->IsDelegate())
+ DebugPort::GetInst()->RemoveSession(p->GetFd());
+ }
+
listener_ = nullptr;
server_.reset();
}