Return-Path: X-Original-To: apmail-mina-commits-archive@minotaur.apache.org Delivered-To: apmail-mina-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C594A1813A for ; Thu, 18 Feb 2016 15:31:25 +0000 (UTC) Received: (qmail 69395 invoked by uid 500); 18 Feb 2016 15:31:22 -0000 Delivered-To: apmail-mina-commits-archive@mina.apache.org Received: (qmail 69362 invoked by uid 500); 18 Feb 2016 15:31:22 -0000 Mailing-List: contact commits-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list commits@mina.apache.org Received: (qmail 69353 invoked by uid 99); 18 Feb 2016 15:31:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Feb 2016 15:31:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8E410DFF67; Thu, 18 Feb 2016 15:31:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lgoldstein@apache.org To: commits@mina.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: mina-sshd git commit: Revert "[SSHD-646] ThreadGroup created in ThreadUtils is not destroyed and causes memory leak" Date: Thu, 18 Feb 2016 15:31:22 +0000 (UTC) Repository: mina-sshd Updated Branches: refs/heads/master fd2a22f58 -> ab8c836fa Revert "[SSHD-646] ThreadGroup created in ThreadUtils is not destroyed and causes memory leak" This reverts commit 7e24f2e1b59f9b3bf026ac3c08f7a0a7baa97a74. Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/ab8c836f Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/ab8c836f Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/ab8c836f Branch: refs/heads/master Commit: ab8c836fa7ad7b0cb92edbe989744359b3acdb3e Parents: fd2a22f Author: Lyor Goldstein Authored: Thu Feb 18 17:31:59 2016 +0200 Committer: Lyor Goldstein Committed: Thu Feb 18 17:31:59 2016 +0200 ---------------------------------------------------------------------- .../java/org/apache/sshd/common/util/threads/ThreadUtils.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/ab8c836f/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java ---------------------------------------------------------------------- diff --git a/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java b/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java index 5fc07be..d0a25ed 100644 --- a/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java +++ b/sshd-core/src/main/java/org/apache/sshd/common/util/threads/ThreadUtils.java @@ -166,9 +166,6 @@ public final class ThreadUtils { ThreadGroup parentGroup = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); String effectiveName = name.replace(' ', '-'); group = new ThreadGroup(parentGroup, "sshd-" + effectiveName + "-group"); - if (!group.isDaemon()) { - group.setDaemon(true); // automatically destroy when last thread dies - } namePrefix = "sshd-" + effectiveName + "-thread-"; } @@ -183,5 +180,7 @@ public final class ThreadUtils { } return t; } + } + }