Skip to content

Commit

Permalink
#233: cleanup completion and writeOperation
Browse files Browse the repository at this point in the history
  • Loading branch information
jrse committed Jan 17, 2019
1 parent 8d50d3c commit 84c5f35
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/librmb/rados-storage-impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ bool RadosStorageImpl::wait_for_write_operations_complete(librados::AioCompletio
}

bool failed = false;

switch (wait_method) {
case WAIT_FOR_COMPLETE_AND_CB:
completion->wait_for_complete_and_cb();
Expand All @@ -226,13 +227,13 @@ bool RadosStorageImpl::wait_for_write_operations_complete(librados::AioCompletio
default:
completion->wait_for_complete_and_cb();
break;

failed = completion->get_return_value() < 0 || failed ? true : false;
// clean up
completion->release();
write_operation->remove();
delete write_operation;
}
failed = completion->get_return_value() < 0 || failed ? true : false;
// clean up
completion->release();
write_operation->remove();
delete write_operation;

return failed;
}

Expand Down

0 comments on commit 84c5f35

Please sign in to comment.