Skip to content

Commit

Permalink
qt, rpc: Accept stop RPC even another command is executing
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Oct 29, 2020
1 parent 916d752 commit 980b8e9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/qt/rpcconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ void RPCConsole::on_lineEdit_returnPressed()
{
QString cmd = ui->lineEdit->text();

if (cmd.isEmpty() || m_is_executing) {
if (cmd.isEmpty()) {
return;
}

Expand All @@ -908,6 +908,16 @@ void RPCConsole::on_lineEdit_returnPressed()
return;
}

if (cmd.startsWith("stop")) {
std::string dummy;
RPCExecuteCommandLine(m_node, dummy, cmd.toStdString());
return;
}

if (m_is_executing) {
return;
}

ui->lineEdit->clear();

#ifdef ENABLE_WALLET
Expand Down

0 comments on commit 980b8e9

Please sign in to comment.