client info cancel

This commit is contained in:
Michael Davidsaver
2020-02-21 10:28:20 -08:00
parent cfa18525cf
commit f76f1c8cb4
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ struct Channel;
// internal actions on an Operation
struct OperationBase : public Operation
{
const std::shared_ptr<Channel> chan;
std::shared_ptr<Channel> chan;
uint32_t ioid;
OperationBase(operation_t op, const std::shared_ptr<Channel>& chan);
+10 -2
View File
@@ -36,11 +36,19 @@ struct InfoOp : public OperationBase
cancel();
}
virtual void cancel() override final {}
virtual void cancel() override final {
auto context = chan->context;
context->tcp_loop.call([this](){
state = Done;
chan.reset();
});
}
virtual void createOp() override final
{
assert(state==Connecting);
if(state!=Connecting) {
return;
}
auto& conn = chan->conn;