ok2c commented on code in PR #581:
URL: 
https://github.com/apache/httpcomponents-core/pull/581#discussion_r2713931561


##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/H2StreamTimeoutException.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * ====================================================================
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+package org.apache.hc.core5.http2;
+
+import java.io.InterruptedIOException;
+
+import org.apache.hc.core5.util.Timeout;
+
+/**
+ * {@link java.net.SocketTimeoutException} raised by the HTTP/2 stream
+ * multiplexer when a per-stream timeout elapses.
+ * <p>
+ * This exception is used for timeouts that are scoped to a single HTTP/2
+ * stream rather than the underlying TCP connection, for example:
+ * </p>
+ * <ul>
+ *     <li>an idle timeout where no activity has been observed on the stream, 
or</li>
+ *     <li>a lifetime timeout where the total age of the stream exceeds
+ *     the configured limit.</li>
+ * </ul>
+ * <p>
+ * The {@link #isIdleTimeout()} flag can be used to distinguish whether

Review Comment:
   @arturobernalg Please update



##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/AbstractH2StreamMultiplexer.java:
##########
@@ -1579,4 +1589,29 @@ public String toString() {
 
     }
 
+    private void checkStreamTimeouts(final long nowNanos) throws IOException {

Review Comment:
   @arturobernalg This is important. We do not this check to fire on each and 
every i/o event. The default granularity of socket timeouts supported the 
non-blocking i/o reactor is 1 second. We should do something very similar here. 
See this method  
[#validateActiveChannels()](https://github.com/apache/httpcomponents-core/blob/master/httpcore5/src/main/java/org/apache/hc/core5/reactor/SingleCoreIOReactor.java#L178)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to