Special case. We can't join the command_tp thread from itself.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
{
if (!require_mon_peer(m))
return;
+
+ // special case shutdown, since shutdown() stops the command_tp
+ if (m->cmd[0] == "stop") {
+ shutdown();
+ m->put();
+ return;
+ }
+
Command *c = new Command(m->cmd, m->get_tid(), m->get_data(), NULL);
command_wq.queue(c);
m->put();
return;
}
+ // special case shutdown, since shutdown() stops the command_tp
+ if (m->cmd[0] == "stop") {
+ shutdown();
+ m->put();
+ return;
+ }
+
Command *c = new Command(m->cmd, m->get_tid(), m->get_data(), con);
command_wq.queue(c);