[
https://issues.apache.org/jira/browse/KAFKA-5785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16141395#comment-16141395
]
ASF GitHub Bot commented on KAFKA-5785:
---------------------------------------
GitHub user ijuma opened a pull request:
https://github.com/apache/kafka/pull/3734
KAFKA-5785; Always close connection if KafkaChannel.setSend throws exception
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ijuma/kafka
kafka-5785-always-close-connection-if-set-send-throws-exception
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3734.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3734
----
commit 12d2fb4c151b2786b9f6db687cae6cda55155f37
Author: Ismael Juma <[email protected]>
Date: 2017-08-25T09:06:32Z
KAFKA-5785; Always close connection if KafkaChannel.setSend throws exception
----
> Always close connection if KafkaChannel.setSend throws exception
> ----------------------------------------------------------------
>
> Key: KAFKA-5785
> URL: https://issues.apache.org/jira/browse/KAFKA-5785
> Project: Kafka
> Issue Type: Bug
> Reporter: Ismael Juma
> Assignee: Ismael Juma
> Fix For: 0.11.0.1, 1.0.0
>
>
> The code is currently:
> {code}
> try {
> channel.setSend(send);
> } catch (CancelledKeyException e) {
> this.failedSends.add(connectionId);
> close(channel, false);
> }
> {code}
> This is generally OK, but if another exception is thrown (typically due to a
> bug), we leak the connection.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)