Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.5.3
-
None
-
None
Description
Collection Connection.tempDests is modified during enumeration and results in an exception and a failure to close connections.
In Connection Close()
foreach(ActiveMQTempDestination dest in this.tempDests.Values)
{
dest.Delete();
}
In ActiveMQTempDestination..
public void Delete() { if(this.connection != null) { this.connection.DeleteTemporaryDestination(this); } }
Connection.DeleteTemporaryDestination..
public void DeleteTemporaryDestination(IDestination destination) { CheckClosedOrFailed(); ActiveMQTempDestination temp = destination as ActiveMQTempDestination; foreach(Session session in this.sessions) { if(session.IsInUse(temp)) { throw new NMSException("A consumer is consuming from the temporary destination"); } } this.tempDests.Remove(destination as ActiveMQTempDestination); this.DeleteDestination(destination); }