Skip to content

Commit

Permalink
using io_uring_free_probe() (#524)
Browse files Browse the repository at this point in the history
* io_uring_free_probe()
  • Loading branch information
lihuiba authored Jul 16, 2024
1 parent f621218 commit e62865a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion io/iouring-wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class iouringEngine : public MasterEventEngine, public CascadingEventEngine, pub
if (probe == nullptr) {
LOG_ERROR_RETURN(0, -1, "iouring: failed to get probe");
}
DEFER(free(probe));
DEFER(io_uring_free_probe(probe));
if (!io_uring_opcode_supported(probe, IORING_OP_PROVIDE_BUFFERS) ||
!io_uring_opcode_supported(probe, IORING_OP_ASYNC_CANCEL)) {
LOG_ERROR_RETURN(0, -1, "iouring: some opcodes are not supported");
Expand Down
3 changes: 2 additions & 1 deletion rpc/test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ TEST_F(RpcTest, passive_shutdown) {

// The passive shutdown took 3 seconds, until client closed the connection
GTEST_ASSERT_GT(duration, 2900);
GTEST_ASSERT_LT(duration, 3200);
// Since GH CI is slow, we allow 3.5 secs
GTEST_ASSERT_LT(duration, 3500);
}

int main(int argc, char** arg)
Expand Down

0 comments on commit e62865a

Please sign in to comment.