Skip to content

Commit 3086a9e

Browse files
committed
fix
1 parent 225f4d4 commit 3086a9e

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

include/ylt/coro_io/ibverbs/ib_socket.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,15 @@
88
#include <cstddef>
99
#include <cstdint>
1010
#include <cstdlib>
11-
#include <deque>
1211
#include <exception>
13-
#include <functional>
14-
#include <iostream>
1512
#include <memory>
1613
#include <queue>
1714
#include <stdexcept>
1815
#include <system_error>
1916
#include <utility>
2017

21-
#include "asio/any_io_executor.hpp"
2218
#include "asio/dispatch.hpp"
2319
#include "asio/ip/address.hpp"
24-
#include "asio/ip/address_v4.hpp"
2520
#include "asio/ip/tcp.hpp"
2621
#include "asio/posix/stream_descriptor.hpp"
2722
#include "async_simple/Signal.h"
@@ -101,8 +96,8 @@ struct ib_socket_shared_state_t
10196
std::shared_ptr<ib_buffer_pool_t> ib_buffer_pool_;
10297
std::unique_ptr<asio::posix::stream_descriptor> fd_;
10398
std::unique_ptr<ibv_comp_channel, ib_deleter> channel_;
104-
std::unique_ptr<ibv_qp, ib_deleter> qp_;
10599
std::unique_ptr<ibv_cq, ib_deleter> cq_;
100+
std::unique_ptr<ibv_qp, ib_deleter> qp_;
106101

107102
asio::ip::tcp::socket soc_;
108103
std::atomic<bool> has_close_ = 0;
@@ -145,14 +140,11 @@ struct ib_socket_shared_state_t
145140
ELOG_ERROR << "ibv_modify_qp IBV_QPS_RESET failed, "
146141
<< std::make_error_code(std::errc{ret}).message();
147142
}
148-
// qp_ = nullptr;
149-
// cq_ = nullptr;
150143
}
151144
if (fd_) {
152145
fd_->cancel(ec);
153-
fd_->close(ec);
146+
fd_->release();
154147
}
155-
// channel_ = nullptr;
156148
}
157149

158150
void close(bool should_check = true) {

include/ylt/coro_rpc/impl/coro_rpc_client.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -224,18 +224,6 @@ class coro_rpc_client {
224224

225225
static inline const config default_config;
226226

227-
/*!
228-
* Create client with io_context
229-
* @param io_context asio io_context, async event handler
230-
*/
231-
// coro_rpc_client(asio::io_context::executor_type executor, config conf = {})
232-
// : control_(std::make_shared<control_t>(executor, false)),
233-
// timer_(std::make_unique<coro_io::period_timer>(executor)) {
234-
// if (!init_config(conf)) [[unlikely]] {
235-
// close();
236-
// }
237-
// }
238-
239227
/*!
240228
* Create client with executor
241229
* @param executor coro_io's executor, default executor is come

0 commit comments

Comments
 (0)