Skip to content

Commit

Permalink
Close connection in case of unexpected exception in Drift server
Browse files Browse the repository at this point in the history
Otherwise the clients may be hanging forever, as the connection may be
no longer in a consistent state
  • Loading branch information
arhimondr authored and electrum committed Dec 13, 2018
1 parent ae2f9bc commit 035d946
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ public void channelRead(ChannelHandlerContext context, Object message)
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause)
{
ctx.close();
// Don't log connection closed exceptions
if (!isConnectionClosed(cause)) {
log.error(cause);
Expand Down

0 comments on commit 035d946

Please sign in to comment.