File tree Expand file tree Collapse file tree 5 files changed +20
-17
lines changed Expand file tree Collapse file tree 5 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,8 @@ class ib_device_t {
174
174
throw std::system_error (ec);
175
175
}
176
176
177
- ELOG_TRACE << " Active MTU: " << detail::mtu_str (attr_.active_mtu ) << " , "
177
+ ELOG_TRACE << name_ << " Active MTU: " << detail::mtu_str (attr_.active_mtu )
178
+ << " , "
178
179
<< " Max MTU: " << detail::mtu_str (attr_.max_mtu );
179
180
180
181
find_best_gid_index ();
Original file line number Diff line number Diff line change @@ -823,11 +823,12 @@ class ib_socket_t {
823
823
}
824
824
825
825
if (ec) {
826
+ auto send_cb = std::move (self->send_cb_ );
826
827
self->close ();
827
828
ib_socket_shared_state_t::resume (std::pair{ec, std::size_t {0 }},
828
829
self->recv_cb_ );
829
830
ib_socket_shared_state_t::resume (std::pair{ec, std::size_t {0 }},
830
- self-> send_cb_ );
831
+ send_cb );
831
832
break ;
832
833
}
833
834
}
Original file line number Diff line number Diff line change 8
8
#include < regex>
9
9
#include < span>
10
10
#include < string>
11
- #include < thread>
12
11
#include < vector>
13
12
14
- #include " async_simple/coro/Lazy.h"
15
- #include " async_simple/coro/SyncAwait.h"
16
- #include " cinatra/cinatra_log_wrapper.hpp"
17
- #if __has_include("ylt/coro_io/coro_io.hpp")
18
- #include " ylt/coro_io/coro_io.hpp"
19
- #else
20
- #include " cinatra/ylt/coro_io/coro_io.hpp"
21
- #endif
22
-
23
13
#ifdef CINATRA_ENABLE_METRIC_JSON
24
14
namespace iguana {
25
15
Original file line number Diff line number Diff line change 1
1
#pragma once
2
+ #include < iostream>
2
3
#include < shared_mutex>
3
4
#include < system_error>
5
+ #include < thread>
4
6
#include < utility>
5
7
8
+ #include " async_simple/coro/Lazy.h"
9
+ #include " async_simple/coro/SyncAwait.h"
10
+ #if __has_include("ylt/coro_io/coro_io.hpp")
11
+ #include " ylt/coro_io/coro_io.hpp"
12
+ #else
13
+ #include " cinatra/ylt/coro_io/coro_io.hpp"
14
+ #endif
6
15
#include " metric.hpp"
7
16
#include " ylt/util/map_sharded.hpp"
8
17
@@ -11,14 +20,14 @@ class manager_helper {
11
20
public:
12
21
static bool register_metric (auto & metric_map, auto metric) {
13
22
if (metric::metric_t ::g_user_metric_count > ylt_metric_capacity) {
14
- CINATRA_LOG_ERROR << " metric count at capacity size: "
15
- << metric::metric_t ::g_user_metric_count;
23
+ std::cerr << " metric count at capacity size: "
24
+ << metric::metric_t ::g_user_metric_count << std::endl ;
16
25
return false ;
17
26
}
18
27
auto && [it, r] = metric_map.try_emplace (metric->str_name (), metric);
19
28
if (!r) {
20
- CINATRA_LOG_ERROR << " duplicate registered metric name: "
21
- << metric-> str_name () ;
29
+ std::cerr << " duplicate registered metric name: " << metric-> str_name ()
30
+ << std::endl ;
22
31
return false ;
23
32
}
24
33
Original file line number Diff line number Diff line change @@ -184,7 +184,9 @@ int main(int argc, char** argv) {
184
184
easylog::set_async (false );
185
185
186
186
#ifdef YLT_ENABLE_IBV
187
- coro_io::g_ib_buffer_pool ({.buffer_size = conf.buffer_size });
187
+ if (conf.enable_ib ) {
188
+ coro_io::g_ib_buffer_pool ({.buffer_size = conf.buffer_size });
189
+ }
188
190
#endif
189
191
190
192
if (conf.client_concurrency == 0 ) {
You can’t perform that action at this time.
0 commit comments