Skip to content

Commit ac2d064

Browse files
janisozaurmsciotti
authored andcommitted
Flatten the condition to get rid of empty branch (discord#247)
1 parent d63ed30 commit ac2d064

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/rpc_connection.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ void RpcConnection::Open()
2626
return;
2727
}
2828

29-
if (state == State::Disconnected) {
30-
if (connection->Open()) {
31-
}
32-
else {
33-
return;
34-
}
29+
if (state == State::Disconnected && !connection->Open()) {
30+
return;
3531
}
3632

3733
if (state == State::SentHandshake) {

0 commit comments

Comments
 (0)