File tree Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Expand file tree Collapse file tree 2 files changed +2
-22
lines changed Original file line number Diff line number Diff line change 8
8
#include < cstddef>
9
9
#include < cstdint>
10
10
#include < cstdlib>
11
- #include < deque>
12
11
#include < exception>
13
- #include < functional>
14
- #include < iostream>
15
12
#include < memory>
16
13
#include < queue>
17
14
#include < stdexcept>
18
15
#include < system_error>
19
16
#include < utility>
20
17
21
- #include " asio/any_io_executor.hpp"
22
18
#include " asio/dispatch.hpp"
23
19
#include " asio/ip/address.hpp"
24
- #include " asio/ip/address_v4.hpp"
25
20
#include " asio/ip/tcp.hpp"
26
21
#include " asio/posix/stream_descriptor.hpp"
27
22
#include " async_simple/Signal.h"
@@ -101,8 +96,8 @@ struct ib_socket_shared_state_t
101
96
std::shared_ptr<ib_buffer_pool_t > ib_buffer_pool_;
102
97
std::unique_ptr<asio::posix::stream_descriptor> fd_;
103
98
std::unique_ptr<ibv_comp_channel, ib_deleter> channel_;
104
- std::unique_ptr<ibv_qp, ib_deleter> qp_;
105
99
std::unique_ptr<ibv_cq, ib_deleter> cq_;
100
+ std::unique_ptr<ibv_qp, ib_deleter> qp_;
106
101
107
102
asio::ip::tcp::socket soc_;
108
103
std::atomic<bool > has_close_ = 0 ;
@@ -145,14 +140,11 @@ struct ib_socket_shared_state_t
145
140
ELOG_ERROR << " ibv_modify_qp IBV_QPS_RESET failed, "
146
141
<< std::make_error_code (std::errc{ret}).message ();
147
142
}
148
- // qp_ = nullptr;
149
- // cq_ = nullptr;
150
143
}
151
144
if (fd_) {
152
145
fd_->cancel (ec);
153
- fd_->close (ec );
146
+ fd_->release ( );
154
147
}
155
- // channel_ = nullptr;
156
148
}
157
149
158
150
void close (bool should_check = true ) {
Original file line number Diff line number Diff line change @@ -224,18 +224,6 @@ class coro_rpc_client {
224
224
225
225
static inline const config default_config;
226
226
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
-
239
227
/* !
240
228
* Create client with executor
241
229
* @param executor coro_io's executor, default executor is come
You can’t perform that action at this time.
0 commit comments