[NC-1772] Release DisconnectMessage to avoid leaking memory allocation. (#130)

Adrian Sutton 6 years ago committed by GitHub
parent 72780b2320
commit 5442163c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      ethereum/p2p/src/main/java/tech/pegasys/pantheon/ethereum/p2p/netty/ApiHandler.java

@ -92,6 +92,8 @@ final class ApiHandler extends SimpleChannelInboundHandler<MessageData> {
"Received Wire DISCONNECT, but unable to parse reason. Peer: {}", "Received Wire DISCONNECT, but unable to parse reason. Peer: {}",
connection.getPeer().getClientId(), connection.getPeer().getClientId(),
e); e);
} finally {
disconnect.release();
} }
connection.terminateConnection(reason, true); connection.terminateConnection(reason, true);

Loading…
Cancel
Save