Update buffer readerIndex after XML parsing error
[netconf.git] / netconf / netconf-netty-util / src / main / java / org / opendaylight / netconf / nettyutil / handler / NetconfXMLToMessageDecoder.java
index 9244d8ee1993ae84ff0f56ae661fb3cd264fbff0..0a1e44f264d7e69521fc0bcda4de08798f0ee70a 100644 (file)
@@ -74,6 +74,7 @@ public final class NetconfXMLToMessageDecoder extends ByteToMessageDecoder {
             } catch (SAXParseException e) {
                 LOG.error("Failed to parse received message", e);
                 out.add(e);
+                in.skipBytes(in.readableBytes());
             }
         } else {
             LOG.debug("No more content in incoming buffer.");