remove commented code
This commit is contained in:
parent
3e65994474
commit
d22f1cd1ed
14
src/rpc.cpp
14
src/rpc.cpp
|
@ -329,10 +329,6 @@ RPCServer::RPCServer() {
|
||||||
|
|
||||||
return json::object();
|
return json::object();
|
||||||
};
|
};
|
||||||
|
|
||||||
// m_requests["/callbacks_poll"] = [this](const json dict) {
|
|
||||||
// return json::object();
|
|
||||||
// };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RPCServer::~RPCServer() {
|
RPCServer::~RPCServer() {
|
||||||
|
@ -370,13 +366,7 @@ void RPCServer::run_callback(JSContextRef ctx, JSObjectRef function, JSObjectRef
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
// // Wait for the next callback result to come off the result stack.
|
// Wait for this callback call result to come off the result stack.
|
||||||
// while (server->m_callback_results.empty()) {
|
|
||||||
// // This may recursively bring us into another callback, hence the callback results being a stack.
|
|
||||||
// server->m_worker.try_run_task();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
json callbackResult = nullptr;
|
json callbackResult = nullptr;
|
||||||
while (callbackResult == nullptr) {
|
while (callbackResult == nullptr) {
|
||||||
callbackResult = server->m_callback_results.pop_if([&](json result) {
|
callbackResult = server->m_callback_results.pop_if([&](json result) {
|
||||||
|
@ -395,8 +385,6 @@ void RPCServer::run_callback(JSContextRef ctx, JSObjectRef function, JSObjectRef
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//json results = server->m_callback_results.pop_back();
|
|
||||||
|
|
||||||
json results = callbackResult;
|
json results = callbackResult;
|
||||||
json error = results["error"];
|
json error = results["error"];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue