Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 21823 invoked from network); 6 Dec 2009 17:07:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Dec 2009 17:07:56 -0000 Received: (qmail 98284 invoked by uid 500); 6 Dec 2009 17:07:56 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 98199 invoked by uid 500); 6 Dec 2009 17:07:55 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 98177 invoked by uid 99); 6 Dec 2009 17:07:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 17:07:55 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of teemu@torma.org designates 213.41.244.89 as permitted sender) Received: from [213.41.244.89] (HELO lou-bada.net) (213.41.244.89) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Dec 2009 17:07:52 +0000 Received: by lou-bada.net (Postfix, from userid 119) id 6071826A15D; Sun, 6 Dec 2009 18:07:29 +0100 (CET) Authentication-Results: lou-bada.net; dkim=permerror (verification error: empty key record; insecure key) header.i=@torma.org; dkim-adsp=none (insecure policy) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hessu X-Spam-Level: Received: from helmut.localnet (helmut.lou-bada.net [IPv6:2001:7a8:b459:3:221:5cff:fe4b:c539]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lou-bada.net (Postfix) with ESMTPS id 0241926A142 for ; Sun, 6 Dec 2009 18:07:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=torma.org; s=torma.org.key; t=1260119248; bh=8gptj/hZD1I8vkX+1aIde/7msLBqh6Nf6Fw6qdgtRJk=; h=From:To:Subject:Date:References:In-Reply-To:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id; b=K5NM+hCcenWYYJn1r0XRGmGz6fiGttIfJGbSjfbn2dzgRZcgxsaTJRI/veIWRXvYj aG24KbLuotksZBguuyFxgDeC6q1RZ7iBKVsxG6Ndlkqe0teW0p/tAAqw1PJVWJ2efE pzMmta9GXRZSLcjI+rX/r3l0rpu8HH9nGZZ/akK8= From: Teemu Torma To: dev@activemq.apache.org Subject: Re: [jira] Resolved: (AMQCPP-271) Connection shutdown crashes if the server went down Date: Sun, 6 Dec 2009 18:07:27 +0100 User-Agent: KMail/1.12.2 (Linux/2.6.31-15-generic; KDE/4.3.2; x86_64; ; ) References: <504712989.1260046495959.JavaMail.jira@brutus> <200912061603.19599.teemu@torma.org> <1260117535.2877.3.camel@localhost> In-Reply-To: <1260117535.2877.3.camel@localhost> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200912061807.27303.teemu@torma.org> X-Old-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=ham version=3.2.5 On Sunday 06 December 2009 17:38:54 Timothy Bish wrote: > The method Thread::currentThread won't work after a call to the shutdown > method for the library, which is why its important to clean up your > ActiveMQ-CPP resources for calling it. I meant that in multi-threading application where a thread that is not controlled my activemq-cpp tries to close a session, the Thread::currentThread throws because the thread never had a currentThread in the first place. I tried just to remove the throw and return null pointer and everything appears to work fine. Why not check the thread ids instead of thread structures in shutdown? Teemu