Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connector::Cancel crash #9

Closed
zieckey opened this issue Mar 17, 2017 · 1 comment
Closed

Connector::Cancel crash #9

zieckey opened this issue Mar 17, 2017 · 1 comment
Labels

Comments

@zieckey
Copy link
Collaborator

zieckey commented Mar 17, 2017

When TCPClient is connecting to a host and it is doing a DNS resolving, the user calls TCPClient::Disconnect, that will cause a crush at Connector::Cancel::chan_->DisableAllEvent()

void Connector::Cancel() {
    LOG_INFO << "Cancel to connect " << remote_addr_ << " status=" << StatusToString();
    assert(loop_->IsInLoopThread());
    if (dns_resolver_) {
        dns_resolver_->Cancel();
    }

    assert(timer_);
    timer_->Cancel();
    chan_->DisableAllEvent();
    chan_->Close();
}
@zieckey zieckey added the bug label Mar 17, 2017
zieckey added a commit that referenced this issue Mar 17, 2017
When TCPClient is connecting to a host and it is doing a DNS resolving,
the user calls TCPClient::Disconnect, that will cause a crush at
Connector::Cancel::chan_->DisableAllEvent()

void Connector::Cancel() {
    LOG_INFO << "Cancel to connect " << remote_addr_ << " status=" << StatusToString();
    assert(loop_->IsInLoopThread());
    if (dns_resolver_) {
        dns_resolver_->Cancel();
    }

    assert(timer_);
    timer_->Cancel();
    chan_->DisableAllEvent();
    chan_->Close();
}
@zieckey
Copy link
Collaborator Author

zieckey commented Mar 17, 2017

fixed

@zieckey zieckey closed this as completed Mar 17, 2017
zieckey added a commit that referenced this issue Mar 25, 2017
When TCPClient is connecting to a host and it is doing a DNS resolving,
the user calls TCPClient::Disconnect, that will cause a crush at
Connector::Cancel::chan_->DisableAllEvent()

void Connector::Cancel() {
    LOG_INFO << "Cancel to connect " << remote_addr_ << " status=" << StatusToString();
    assert(loop_->IsInLoopThread());
    if (dns_resolver_) {
        dns_resolver_->Cancel();
    }

    assert(timer_);
    timer_->Cancel();
    chan_->DisableAllEvent();
    chan_->Close();
}
zieckey added a commit that referenced this issue Apr 27, 2017
When TCPClient is connecting to a host and it is doing a DNS resolving,
the user calls TCPClient::Disconnect, that will cause a crush at
Connector::Cancel::chan_->DisableAllEvent()

void Connector::Cancel() {
    LOG_INFO << "Cancel to connect " << remote_addr_ << " status=" << StatusToString();
    assert(loop_->IsInLoopThread());
    if (dns_resolver_) {
        dns_resolver_->Cancel();
    }

    assert(timer_);
    timer_->Cancel();
    chan_->DisableAllEvent();
    chan_->Close();
}
zieckey added a commit that referenced this issue May 20, 2017
When TCPClient is connecting to a host and it is doing a DNS resolving,
the user calls TCPClient::Disconnect, that will cause a crush at
Connector::Cancel::chan_->DisableAllEvent()

void Connector::Cancel() {
    LOG_INFO << "Cancel to connect " << remote_addr_ << " status=" << StatusToString();
    assert(loop_->IsInLoopThread());
    if (dns_resolver_) {
        dns_resolver_->Cancel();
    }

    assert(timer_);
    timer_->Cancel();
    chan_->DisableAllEvent();
    chan_->Close();
}
zieckey added a commit that referenced this issue May 20, 2017
When TCPClient is connecting to a host and it is doing a DNS resolving,
the user calls TCPClient::Disconnect, that will cause a crush at
Connector::Cancel::chan_->DisableAllEvent()

void Connector::Cancel() {
    LOG_INFO << "Cancel to connect " << remote_addr_ << " status=" << StatusToString();
    assert(loop_->IsInLoopThread());
    if (dns_resolver_) {
        dns_resolver_->Cancel();
    }

    assert(timer_);
    timer_->Cancel();
    chan_->DisableAllEvent();
    chan_->Close();
}
@acyi acyi mentioned this issue Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant