aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/net.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc/net.cpp')
-rw-r--r--src/rpc/net.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 6fdf80dc5f..59bc8e8091 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -565,7 +565,13 @@ static UniValue setban(const JSONRPCRequest& request)
if (request.params[3].isTrue())
absolute = true;
- isSubnet ? g_connman->Ban(subNet, BanReasonManuallyAdded, banTime, absolute) : g_connman->Ban(netAddr, BanReasonManuallyAdded, banTime, absolute);
+ if (isSubnet) {
+ g_connman->Ban(subNet, BanReasonManuallyAdded, banTime, absolute);
+ g_connman->DisconnectNode(subNet);
+ } else {
+ g_connman->Ban(netAddr, BanReasonManuallyAdded, banTime, absolute);
+ g_connman->DisconnectNode(netAddr);
+ }
}
else if(strCommand == "remove")
{