summaryrefslogtreecommitdiffstats
path: root/src/rgw/rgw_amqp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/rgw/rgw_amqp.cc')
-rw-r--r--src/rgw/rgw_amqp.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/rgw/rgw_amqp.cc b/src/rgw/rgw_amqp.cc
index 7504d47c6c9..5bc5d173c73 100644
--- a/src/rgw/rgw_amqp.cc
+++ b/src/rgw/rgw_amqp.cc
@@ -650,6 +650,9 @@ private:
// (4) TODO reconnect on connection errors
// (5) TODO cleanup timedout callbacks
void run() noexcept {
+ // give the runner thread a name for easier debugging
+ ceph_pthread_setname("amqp_manager");
+
amqp_frame_t frame;
while (!stopped) {
@@ -838,12 +841,6 @@ public:
// This is to prevent rehashing so that iterators are not invalidated
// when a new connection is added.
connections.max_load_factor(10.0);
- // give the runner thread a name for easier debugging
- const char* thread_name = "amqp_manager";
- if (const auto rc = ceph_pthread_setname(runner.native_handle(), thread_name); rc != 0) {
- ldout(cct, 1) << "ERROR: failed to set amqp manager thread name to: " << thread_name
- << ". error: " << rc << dendl;
- }
}
// non copyable