Fix one more possible leak as a follow up of 341a235fea

This commit is contained in:
Norman Maurer 2016-05-13 18:38:37 +02:00
parent 341a235fea
commit 979dc3e3e4

View File

@ -346,12 +346,18 @@ public class Http2ServerDowngraderTest {
Http2ResetFrame reset = new DefaultHttp2ResetFrame(0);
Http2GoAwayFrame goaway = new DefaultHttp2GoAwayFrame(0);
assertTrue(ch.writeInbound(reset));
assertTrue(ch.writeInbound(goaway));
assertTrue(ch.writeInbound(goaway.retain()));
assertEquals(reset, ch.readInbound());
assertEquals(goaway, ch.readInbound());
assertThat(ch.readInbound(), is(nullValue()));
assertFalse(ch.finish());
Http2GoAwayFrame frame = ch.readInbound();
try {
assertEquals(goaway, frame);
assertThat(ch.readInbound(), is(nullValue()));
assertFalse(ch.finish());
} finally {
goaway.release();
frame.release();
}
}
}