On Thu, 25 Jun 2026 09:31:11 GMT, Kieran Farrell <[email protected]> wrote:

>> It might be better to include the channel being closed in the log message. 
>> Something like:
>> 
>> 
>> logger.log(Level.DEBUG, "connection limit reached, closing accepted 
>> connection " + chan);
>> 
>> That should provide one form of identification because it will include the 
>> local and remote host/port details of the connection being closed.
>
> I wasn’t sure on what level of detail we wanted to expose, but I just noticed 
> that client address/port logging already exists at debug level logging in 
> 
> 
> for (HttpConnection c : toClose) {
>                         logger.log(Level.DEBUG, "closing: no response: " + c);
> 
> 
> since HttpConnection.toString() includes printing chan. So maybe adding chan 
> to the log as @jaikiran suggested would be acceptable.

It's a good suggestion to print the rejected channel to the log, as long the 
trace is DEBUG. I'd prefer that to adding a global HttpServer instance 
identifier.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/31670#discussion_r3473398122

Reply via email to