Author: aidan
Date: Mon Apr 21 04:33:07 2008
New Revision: 650108
URL: http://svn.apache.org/viewvc?rev=650108&view=rev
Log:
QPID-832 revert last commit, 650099
Modified:
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
Modified:
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java?rev=650108&r1=650107&r2=650108&view=diff
==============================================================================
---
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
(original)
+++
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
Mon Apr 21 04:33:07 2008
@@ -913,31 +913,31 @@
{
synchronized(_sessionCreationLock)
{
- synchronized (getFailoverMutex())
+ if(!sessions.isEmpty())
+ {
+ AMQSession session = sessions.remove(0);
+ synchronized(session.getMessageDeliveryLock())
+ {
+ close(sessions, timeout);
+ }
+ }
+ else
{
if (!_closed.getAndSet(true))
{
- if(!sessions.isEmpty())
- {
- AMQSession session = sessions.remove(0);
- synchronized(session.getMessageDeliveryLock())
- {
- close(sessions, timeout);
- }
- }
- else
+ synchronized (getFailoverMutex())
{
try
{
long startCloseTime = System.currentTimeMillis();
- closeAllSessions(null, timeout, startCloseTime);
+ closeAllSessions(null, timeout, startCloseTime);
- //This MUST occur after we have successfully
closed all Channels/Sessions
- _taskPool.shutdown();
+ //This MUST occur after we have successfully closed
all Channels/Sessions
+ _taskPool.shutdown();
- if (!_taskPool.isTerminated())
- {
+ if (!_taskPool.isTerminated())
+ {
try
{
// adjust timeout