ok2c commented on code in PR #785:
URL: 
https://github.com/apache/httpcomponents-client/pull/785#discussion_r2700949796


##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/DefaultManagedHttpClientConnection.java:
##########
@@ -182,15 +181,15 @@ public void close(final CloseMode closeMode) {
     @Override
     public void bind(final Socket socket) throws IOException {
         super.bind(WIRE_LOG.isDebugEnabled() ? new LoggingSocketHolder(socket, 
this.id, WIRE_LOG) : new SocketHolder(socket));
-        socketTimeout = Timeout.ofMilliseconds(socket.getSoTimeout());
+        origSocketTimeout = Timeout.ofMilliseconds(socket.getSoTimeout());
     }
 
     @Override
     public void bind(final SSLSocket sslSocket, final Socket socket) throws 
IOException {
         super.bind(WIRE_LOG.isDebugEnabled() ?
                 new LoggingSocketHolder(sslSocket, socket, this.id, WIRE_LOG) :
                 new SocketHolder(sslSocket, socket));
-        socketTimeout = Timeout.ofMilliseconds(sslSocket.getSoTimeout());
+        origSocketTimeout = Timeout.ofMilliseconds(sslSocket.getSoTimeout());

Review Comment:
   @rschmitt Could we keep the original variable name or make a symmetric 
change in `DefaultManagedAsyncClientConnection`?



##########
httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/DefaultHttpClientConnectionOperator.java:
##########
@@ -283,11 +283,10 @@ private void connectToUnixDomainSocket(
         }
         final Socket newSocket = unixDomainSocketFactory.createSocket();
         try {
-            conn.bind(newSocket);

Review Comment:
   @rschmitt There is a reason why the socket get bound to the connection 
before it gets corrected. This enables the user to abort the connection while 
it is being blocked in the connect method. This line cannot be removed.



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