Repository: cloudstack Updated Branches: refs/heads/master 032bce5b5 -> bfa36c028
CID-1116231: Use implicit lock, synchronize _key in Link Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ec134cf0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ec134cf0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ec134cf0 Branch: refs/heads/master Commit: ec134cf0105c6c9a147825d22d8a5d95af44c855 Parents: 032bce5 Author: Rohit Yadav <[email protected]> Authored: Thu Sep 18 11:21:09 2014 +0200 Committer: Rohit Yadav <[email protected]> Committed: Thu Sep 18 11:21:57 2014 +0200 ---------------------------------------------------------------------- utils/src/com/cloud/utils/nio/Link.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec134cf0/utils/src/com/cloud/utils/nio/Link.java ---------------------------------------------------------------------- diff --git a/utils/src/com/cloud/utils/nio/Link.java b/utils/src/com/cloud/utils/nio/Link.java index e4291d0..c295caf 100755 --- a/utils/src/com/cloud/utils/nio/Link.java +++ b/utils/src/com/cloud/utils/nio/Link.java @@ -92,7 +92,9 @@ public class Link { } public void setKey(SelectionKey key) { - _key = key; + synchronized (this) { + _key = key; + } } public void setSSLEngine(SSLEngine sslEngine) {
