mirror of
https://github.com/Icinga/icinga2.git
synced 2025-09-23 17:57:54 +02:00
ApiListener#NewClientHandlerInternal(): reject connections from already connected endpoints
This commit is contained in:
parent
e9b8fc234b
commit
a530dd1b88
@ -657,6 +657,13 @@ void ApiListener::NewClientHandlerInternal(boost::asio::yield_context yc, const
|
|||||||
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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user