LengthFieldBasedFrameDecoder

mrochon mattrochon at gmail.com
Mon Jul 12 12:40:33 EDT 2010


Hi Trustin, Marc,

(Marc in answer to your question I am using a pipeline factory.)

I've managed to nail this down somewhat. The error only occurs when running
in OSGI, when I make too many writes to the socket at once.

The following code fails with SSLException: bad record MAC

[code]
        SSLSocket s = (SSLSocket)createSocket("localhost", 11225, true);
        Assert.notNull(s);

        //write garbage until the server rejects this connection
        while (s.isConnected()) {
           
s.getOutputStream().write("jkhdsbfjsahdflkabhfdskhasdklf".getBytes());
        }
[/code]

But if I add a small Thread.sleep() in the while loop is behaves as
expected.

[code]
        SSLSocket s = (SSLSocket)createSocket("localhost", 11225, true);
        Assert.notNull(s);

        //write garbage until the server rejects this connection
        while (s.isConnected()) {
           
s.getOutputStream().write("jkhdsbfjsahdflkabhfdskhasdklf".getBytes());
            Thread.sleep(100);
        }
[/code]


Have you ever encountered this before?
-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/LengthFieldBasedFrameDecoder-tp5213848p5283697.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list