summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAidan Skinner <aidan@apache.org>2008-05-06 12:40:34 +0000
committerAidan Skinner <aidan@apache.org>2008-05-06 12:40:34 +0000
commita8fe8d0c8a10593fe3413b7a937eeac289a0ed0e (patch)
treecd5c524b991bc96f59205d65e58918c49e85bc57
parenta723a5637e1e7450c45eb631e9441b644a527af9 (diff)
downloadqpid-python-a8fe8d0c8a10593fe3413b7a937eeac289a0ed0e.tar.gz
QPID-1029: Generate temporary queue names using GUIDs to ensure uniqueness.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.x@653760 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs14
1 files changed, 1 insertions, 13 deletions
diff --git a/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs b/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
index 7ae086e35f..1fb3d407eb 100644
--- a/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
+++ b/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
@@ -35,12 +35,6 @@ namespace Apache.Qpid.Client.Protocol
private readonly IProtocolWriter _protocolWriter;
private readonly IConnectionCloser _connectionCloser;
- /**
- * Counter to ensure unique queue names
- */
- private int _queueId = 1;
- private readonly Object _queueIdLock = new Object();
-
/// <summary>
/// Maps from the channel id to the AmqChannel that it represents.
/// </summary>
@@ -267,13 +261,7 @@ namespace Apache.Qpid.Client.Protocol
internal string GenerateQueueName()
{
- int id;
- lock(_queueIdLock)
- {
- id = _queueId++;
- }
-
- return "tmp_" + _connection.Transport.LocalEndpoint + "_" + id;
+ return "ntmp_" + System.Guid.NewGuid();
}
}
}