dschneider-pivotal commented on a change in pull request #6156:
URL: https://github.com/apache/geode/pull/6156#discussion_r657347845



##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/Message.java
##########
@@ -663,35 +672,53 @@ void flushBuffer() throws IOException {
     cb.clear();
   }
 
+  private void writeToSC(ByteBuffer cb) throws IOException {

Review comment:
       rename writeToSocketChannel

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/Message.java
##########
@@ -1161,10 +1288,146 @@ public void receive() throws IOException {
   public void receive(ServerConnection sc, int maxMessageLength, Semaphore 
dataLimiter,
       Semaphore msgLimiter) throws IOException {
     this.serverConnection = sc;
+    if (sc.getIOFilter() != null) {

Review comment:
       I see this pattern in many places. It seems like the null check could be 
moved into setIOFilter which would simplify all the callers.

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerSideHandshakeImpl.java
##########
@@ -49,6 +52,7 @@
   private final KnownVersion clientVersion;
 
   private final byte replyCode;
+  private ServerConnection connection;

Review comment:
       make "connection" final

##########
File path: 
geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ServerConnection.java
##########
@@ -1307,7 +1312,11 @@ SelectableChannel getSelectableChannel() {
   }
 
   void registerWithSelector2(Selector s) throws ClosedChannelException {
-    getSelectableChannel().register(s, SelectionKey.OP_READ, this);
+    if ((getIOFilter() != null) && (getIOFilter() instanceof NioSslEngine)) {

Review comment:
       I think the "!= null" is not needed since "null instanceof X" always 
returns false.




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

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


Reply via email to