Auto-format FlipperClient.cpp

Reviewed By: passy

Differential Revision: D17601356

fbshipit-source-id: 04701b409a838ad4dac54ae7c4f5f97cfa574dbe
This commit is contained in:
John Knox
2019-09-27 02:55:46 -07:00
committed by Facebook Github Bot
parent 6796a87e76
commit 74b9ba5c40

View File

@@ -170,8 +170,8 @@ 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_);
@@ -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;
} }