Browse Source
fix lock issue for QT node diconnect and RPC disconnectnode
Zcash: only RPC disconnectnode
pull/4/head
Jonas Schnelli
9 years ago
committed by
Jack Grigg
No known key found for this signature in database
GPG Key ID: 6A6914DAFBEA00DA
1 changed files with
2 additions and
2 deletions
-
src/rpcnet.cpp
|
|
@ -231,7 +231,7 @@ UniValue disconnectnode(const UniValue& params, bool fHelp) |
|
|
|
if (pNode == NULL) |
|
|
|
throw JSONRPCError(RPC_CLIENT_NODE_NOT_CONNECTED, "Node not found in connected nodes"); |
|
|
|
|
|
|
|
pNode->CloseSocketDisconnect(); |
|
|
|
pNode->fDisconnect = true; |
|
|
|
|
|
|
|
return NullUniValue; |
|
|
|
} |
|
|
@ -520,7 +520,7 @@ UniValue setban(const UniValue& params, bool fHelp) |
|
|
|
|
|
|
|
//disconnect possible nodes
|
|
|
|
while(CNode *bannedNode = (isSubnet ? FindNode(subNet) : FindNode(netAddr))) |
|
|
|
bannedNode->CloseSocketDisconnect(); |
|
|
|
bannedNode->fDisconnect = true; |
|
|
|
} |
|
|
|
else if(strCommand == "remove") |
|
|
|
{ |
|
|
|