You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/10/08 14:49:02 UTC

[httpcomponents-core] branch github_ci_on_win updated: Hack out of desperation

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch github_ci_on_win
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/github_ci_on_win by this push:
     new 0cbd2a16a Hack out of desperation
0cbd2a16a is described below

commit 0cbd2a16a230a8cf4c9c2d038eef2ec2b5aad55e
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat Oct 8 16:48:43 2022 +0200

    Hack out of desperation
---
 .../org/apache/hc/core5/reactor/IOSessionImpl.java     | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
index c9439cbba..dea9a0d32 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSessionImpl.java
@@ -256,15 +256,15 @@ class IOSessionImpl implements IOSession {
     @Override
     public void close(final CloseMode closeMode) {
         if (this.status.compareAndSet(Status.ACTIVE, Status.CLOSED)) {
-            if (closeMode == CloseMode.IMMEDIATE) {
-                try {
-                    this.channel.socket().setSoLinger(true, 0);
-                } catch (final SocketException e) {
-                    // Quietly ignore
-                }
-            }
-            this.key.cancel();
-            this.key.attach(null);
+//            if (closeMode == CloseMode.IMMEDIATE) {
+//                try {
+//                    this.channel.socket().setSoLinger(true, 0);
+//                } catch (final SocketException e) {
+//                    // Quietly ignore
+//                }
+//            }
+//            this.key.cancel();
+//            this.key.attach(null);
             Closer.closeQuietly(this.key.channel());
             if (this.key.selector().isOpen()) {
                 this.key.selector().wakeup();