Moved the call to destroy the CyclicTimeouts to a close() call that is always called.
Fixed NPE in ManagedSelector.getTotalKeys().
Fixed exception handling to avoid infinite recursion in SslConnection.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Fixes#10211 - NPE in ArrayByteBufferPool.findOldestEntry()
Fixed algorithm to check for oldest entry to avoid NPE.
Added comments for clarity.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Method HTTP2StreamEndPoint.flush() has a "no pending operation" semantic, but the previous implementation was calling stream.data(), which may become a pending operation if the stream is congested.
Changed the implementation of flush() to return false in the IDLE and PENDING cases.
Now every flush() is converted to a write(), which has the same semantic as stream.data().
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Fixed handling of Expirable.getExpireNanoTime() in case it returns Long.MAX_VALUE.
Also fixed implementations of Expirable that were not initializing their expireNanoTime field to Long.MAX_VALUE.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Added a new JMX property in SelectorManager that reports total number of keys from all ManagedSelectors
Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
* Fixes#7993 - HttpClient idleTimeout configuration being ignored/overridden
The problem was that the timeout scheduling was not happening,
because for TunnelRequest the timeouts were set in normalizeRequest(),
which runs after the scheduling.
Now a call to request.sent() is made also after normalizeRequest()
so that the timeouts is scheduled (if it was not scheduled before).
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
* Updating to version 10.0.12
* Updating to version 10.0.13-SNAPSHOT
* VERSION.TXT =+ content of jetty-9.4.49.v20220914 release
* remove strange line and reorder
* Fixes#8532 - Review System.nanoTime() usages.
Introduced o.e.j.util.NanoTime class to deal with nanoTimes.
Now NanoTime.now() should be used instead of System.nanoTime(),
and various <unit>[elapsed|since|until]() methods to calculate nanoTimes.
Furthermore, comparing 2 nanoTimes should be done via isBefore(),
rather than using the < operator, which is wrong as specified in
the System.nanoTime() javadocs.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Implemented support for virtual threads for HTTP/1.1, HTTP/2 and HTTP/3.
The virtual thread support is in AdaptiveExecutionStrategy.
When virtual threads are supported and enabled, reserved threads are disabled and
blocking tasks are run in a virtual thread instead that being executed by the Executor.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
All `ByteBufferPool` can now be accessed as `RetainableByteBufferPools`.
Users now need to configure only a single buffer pool and there is just the additional retained parameter that needs consideration.
Default buffer pool has been changed to logarithmic, but we may wish to review that before next release.
Default factor size has been increased to 4096.