Remote control: Fix commands with asynchronous payloads not sending responses

Fixes #5165
This commit is contained in:
Kovid Goyal
2022-06-04 10:13:21 +05:30
parent 835cb31501
commit ce3322bf91
2 changed files with 6 additions and 1 deletions

View File

@@ -424,7 +424,7 @@ parse_input(ChildMonitor *self) {
}
if (resp) {
if (PyBytes_Check(resp)) send_response_to_peer(msg->peer_id, PyBytes_AS_STRING(resp), PyBytes_GET_SIZE(resp));
else if (resp == Py_None) send_response_to_peer(msg->peer_id, NULL, 0);
else if (resp == Py_None || resp == Py_True) send_response_to_peer(msg->peer_id, NULL, 0);
Py_CLEAR(resp);
} else send_response_to_peer(msg->peer_id, NULL, 0);
}