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


##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2Stream.java:
##########
@@ -308,4 +340,37 @@ public String toString() {
         return buf.toString();
     }
 
+    private void markCreatedAndActive() {
+        final long now = System.nanoTime();
+        this.createdNanos = now;
+        this.lastActivityNanos = now;
+    }
+
+    private void touch() {
+        this.lastActivityNanos = System.nanoTime();
+    }
+
+    long getCreatedNanos() {
+        return createdNanos;
+    }
+
+    long getLastActivityNanos() {
+        return lastActivityNanos;
+    }
+
+    Timeout getIdleTimeout() {
+        return idleTimeout;
+    }
+
+    void setIdleTimeout(final Timeout idleTimeout) {

Review Comment:
   @arturobernalg Why are you still doing this? Please implement this method 
instead
   ```
       @Override
       public void setTimeout(final Timeout timeout) {
           // not supported
       }
   ```
   
   This is how the timeout should get initialized. Please remove all your 
timeout initialization code. It is not needed.



##########
httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java:
##########
@@ -158,7 +159,11 @@ public SocketAddress getRemoteAddress() {
 
     @Override
     public int getEventMask() {
-        return this.key.interestOps();
+        try {

Review Comment:
   @arturobernalg Christ on cross. Why do you still have this? 



##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2Stream.java:
##########
@@ -308,4 +340,37 @@ public String toString() {
         return buf.toString();
     }
 
+    private void markCreatedAndActive() {
+        final long now = System.nanoTime();
+        this.createdNanos = now;
+        this.lastActivityNanos = now;
+    }
+
+    private void touch() {
+        this.lastActivityNanos = System.nanoTime();
+    }
+
+    long getCreatedNanos() {
+        return createdNanos;
+    }
+
+    long getLastActivityNanos() {
+        return lastActivityNanos;
+    }
+
+    Timeout getIdleTimeout() {
+        return idleTimeout;
+    }
+
+    void setIdleTimeout(final Timeout idleTimeout) {
+        this.idleTimeout = idleTimeout;
+    }
+
+    Timeout getLifetimeTimeout() {
+        return lifetimeTimeout;

Review Comment:
   @arturobernalg Why do we need it? What purpose does it serve? 
   
   Please remove it. Please focus on the most fundamental and useful scenario 
for now.



-- 
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