Skip to content

Commit

Permalink
Develop Connector module
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigma711 committed Jun 28, 2023
1 parent 76f443d commit fc770c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/connector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,10 @@ void Connector::DoWithError() {
}
int Connector::RemoveAndReset() {
eventer_->DisableAllEvents();
eventer_->RemoveMyself();
int conn_fd = eventer_->Fd();
eventer_->GetReadyDestroy(); // Set Eventer::is_handling_ flag off
eventer_.reset();
// eventer_->SetReadyDestroy(); // Set Eventer::is_handling_ flag off
event_manager_->RunSoon([this]() { this->eventer_.reset(); });
// eventer_.reset(); // Invalid
return conn_fd;
}

0 comments on commit fc770c4

Please sign in to comment.