Auto-format FlipperClient.cpp
Reviewed By: passy Differential Revision: D17601356 fbshipit-source-id: 04701b409a838ad4dac54ae7c4f5f97cfa574dbe
This commit is contained in:
committed by
Facebook Github Bot
parent
6796a87e76
commit
74b9ba5c40
@@ -170,9 +170,9 @@ void FlipperClient::onDisconnected() {
|
|||||||
void FlipperClient::onMessageReceived(
|
void FlipperClient::onMessageReceived(
|
||||||
const dynamic& message,
|
const dynamic& message,
|
||||||
std::unique_ptr<FlipperResponder> uniqueResponder) {
|
std::unique_ptr<FlipperResponder> uniqueResponder) {
|
||||||
// Convert to shared pointer so we can hold on to it while passing it to the plugin, and still use it
|
// Convert to shared pointer so we can hold on to it while passing it to the
|
||||||
// to respond with an error if we catch an exception.
|
// plugin, and still use it to respond with an error if we catch an exception.
|
||||||
std::shared_ptr<FlipperResponder> responder = std::move(uniqueResponder);
|
std::shared_ptr<FlipperResponder> responder = std::move(uniqueResponder);
|
||||||
try {
|
try {
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
const auto& method = message["method"];
|
const auto& method = message["method"];
|
||||||
@@ -237,9 +237,7 @@ void FlipperClient::onMessageReceived(
|
|||||||
}
|
}
|
||||||
const auto& conn = connections_.at(params["api"].getString());
|
const auto& conn = connections_.at(params["api"].getString());
|
||||||
conn->call(
|
conn->call(
|
||||||
params["method"].getString(),
|
params["method"].getString(), params.getDefault("params"), responder);
|
||||||
params.getDefault("params"),
|
|
||||||
responder);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user