Merge branch 'feature/one-connection' into HEAD

This commit is contained in:
Alexander A. Klimov 2020-10-26 13:58:17 +01:00
commit b274809802

View File

@ -696,6 +696,13 @@ void ApiListener::NewClientHandlerInternal(
if (ctype == ClientJsonRpc) { if (ctype == ClientJsonRpc) {
Log(LogNotice, "ApiListener", "New JSON-RPC client"); Log(LogNotice, "ApiListener", "New JSON-RPC client");
if (endpoint && endpoint->GetConnected()) {
Log(LogNotice, "ApiListener")
<< "Ignoring JSON-RPC connection " << conninfo
<< ". We're already connected to Endpoint '" << endpoint->GetName() << "'.";
return;
}
JsonRpcConnection::Ptr aclient = new JsonRpcConnection(identity, verify_ok, client, role); JsonRpcConnection::Ptr aclient = new JsonRpcConnection(identity, verify_ok, client, role);
if (endpoint) { if (endpoint) {