Skip to content

Commit

Permalink
force releasing the buffer on exception
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
  • Loading branch information
lorban committed Jul 8, 2021
1 parent b7d5e0d commit df0d357
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -300,7 +300,12 @@ else if (filled < 0)
{
if (LOG.isDebugEnabled())
LOG.debug("{} caught exception {}", this, _channel.getState(), x);
releaseRequestBuffer();
// Force the release of the _retainableByteBuffer.
if (_retainableByteBuffer != null)
{
while (!_retainableByteBuffer.release());
_retainableByteBuffer = null;
}
getEndPoint().close(x);
}
finally
Expand Down

0 comments on commit df0d357

Please sign in to comment.