Skip to content

Commit 25bbac1

Browse files
committed
Don't abruptly close anonymous connections
This was mistakenly introduced with PR #7686 due to too many open connections (#7680). This was wrong in the sense that closing the connection is simply out of place here and should have been handled differently. After we revised the RPC connection disconnect procedure with `v2.14.4`, it becomes clear why it is wrong, because the connection is closed abruptly before the corresponding response (`result`) has even been written. Now if you remove the disconnect here, shouldn't the issue #7680 occur again, you ask? The answer is no, because we now also have a maximum timeout of `10s` for anonymous connections, after which they are automatically closed. Thanks to the introduction of this timeout by @julianbrost in #8479, this `Disconnect()` call has become superfluous.
1 parent fe85bf1 commit 25bbac1

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

lib/remote/jsonrpcconnection-pki.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,6 @@ Value RequestCertificateHandler(const MessageOrigin::Ptr& origin, const Dictiona
286286
Log(LogInformation, "JsonRpcConnection")
287287
<< "Certificate request for CN '" << cn << "' is pending. Waiting for approval.";
288288

289-
if (origin) {
290-
auto client (origin->FromClient);
291-
292-
if (client && !client->GetEndpoint()) {
293-
client->Disconnect();
294-
}
295-
}
296-
297289
return result;
298290
}
299291

0 commit comments

Comments
 (0)