[
https://issues.apache.org/jira/browse/GEODE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16286611#comment-16286611
]
ASF subversion and git services commented on GEODE-4072:
--------------------------------------------------------
Commit 107eae6af59241d3ed72ea4b43f3d48d27740732 in geode's branch
refs/heads/develop from [~nnag]
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=107eae6 ]
GEODE-4072: Fixed race condition in AckThreadReader shutdown.
* The global connection variable may be set to null by another thread.
* Assign the local variable to the connection variable and then perform
all the null checks on that local variable.
> Race condition in AckReaderThread.shutdown
> -------------------------------------------
>
> Key: GEODE-4072
> URL: https://issues.apache.org/jira/browse/GEODE-4072
> Project: Geode
> Issue Type: Bug
> Components: wan
> Reporter: nabarun
> Assignee: nabarun
>
> *+Issue+*
> {code:title=AckReaderThread.java}
> if (connection != null) {
> Connection conn = connection;
> shutDownAckReaderConnection();
> if (!conn.isDestroyed()) {
> conn.destroy();
> sender.getProxy().returnConnection(conn);
> }
> }
> {code}
> The global connection variable may be set to null before it is assigned to
> the local variable, resulting in NPE.
> *Solution*:
> --set the local variable to the connection variable and use that local
> variable for null checks.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)