Bump SSHD to 2.9.2
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / ssh / client / NettyAwareChannelSubsystem.java
index 035bbdcba04f9ed71485e1a5419fc56bbafe90e9..99bfca7f6cfb10947bd42ca97d34cdd5ef4426e2 100644 (file)
@@ -37,7 +37,7 @@ public class NettyAwareChannelSubsystem extends ChannelSubsystem {
         if (!isClosing()) {
             // TODO: consider using context's allocator for heap buffer here
             ctx.fireChannelRead(Unpooled.copiedBuffer(data, off, (int) len));
-            adjustWindow(len);
+            getLocalWindow().check();
         }
     }
 
@@ -46,14 +46,10 @@ public class NettyAwareChannelSubsystem extends ChannelSubsystem {
         // If we're already closing, ignore incoming data
         if (!isClosing()) {
             LOG.debug("Discarding {} bytes of extended data", len);
-            adjustWindow(len);
+            getLocalWindow().check();
         }
     }
 
-    private void adjustWindow(final long len) throws IOException {
-        getLocalWindow().consumeAndCheck(len);
-    }
-
     @Override
     public void close() {
         this.close(false);