Skip to content

Commit

Permalink
Memory leak fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
EinsamHauer committed Mar 23, 2020
1 parent b9941a3 commit 6ef53a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.iponweb.disthene.reader</groupId>
<artifactId>disthene-reader</artifactId>
<packaging>jar</packaging>
<version>1.0.11</version>
<version>1.0.12</version>
<name>disthene-reader</name>
<url>http://maven.apache.org</url>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public void channelRead(ChannelHandlerContext ctx, Object message) {
}
}


if (handler != null) {
response = handler.handle(request);
} else {
Expand All @@ -84,6 +83,8 @@ public void channelRead(ChannelHandlerContext ctx, Object message) {
logger.debug("Invalid request: ", e);
FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, INTERNAL_SERVER_ERROR, Unpooled.wrappedBuffer(("Ohoho.. We have a problem: " + e.getMessage()).getBytes()));
ctx.write(response).addListener(ChannelFutureListener.CLOSE);
} finally {
((HttpContent) message).content().release();
}
}

Expand Down

0 comments on commit 6ef53a2

Please sign in to comment.