From ac2d064cb0e7f7dc1596d7dd99d64aab4c6896b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Tue, 6 Nov 2018 23:48:59 +0100 Subject: [PATCH] Flatten the condition to get rid of empty branch (#247) --- src/rpc_connection.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/rpc_connection.cpp b/src/rpc_connection.cpp index bf9e4cc..0933162 100644 --- a/src/rpc_connection.cpp +++ b/src/rpc_connection.cpp @@ -26,12 +26,8 @@ void RpcConnection::Open() return; } - if (state == State::Disconnected) { - if (connection->Open()) { - } - else { - return; - } + if (state == State::Disconnected && !connection->Open()) { + return; } if (state == State::SentHandshake) {