94f42b648feea77bd09dc3fdb48e6db2b48c7717 added a new error condition to
IoCtx::aio_unwatch() that callers aren't prepared to handle. instead of
returning that error directly, report it asynchronously to the
AioCompletion
Signed-off-by: Casey Bodley <cbodley@redhat.com>
c->io = this;
boost::intrusive_ptr linger_op = objecter->linger_by_cookie(cookie);
if (!linger_op) {
- return -ENOTCONN;
+ // reject invalid cookies with ENOTCONN, but deliver to the
+ // AioCompletion instead of returning directly
+ c->rval = -ENOTCONN;
+ c->complete = true;
+ if (c->callback_complete || c->callback_safe) {
+ boost::asio::defer(client->finish_strand, CB_AioComplete(c));
+ }
+
+ return 0;
}
Context *oncomplete = new C_aio_linger_Complete(c, linger_op, true);