Skip to content

Commit

Permalink
Updated so that RhinoQueuesTransport.Endpoint/IServiceBus.Endpoint re…
Browse files Browse the repository at this point in the history
…flects correct port# when port is auto selected.
  • Loading branch information
Ken Baltrinic committed Jul 15, 2011
1 parent 32341ec commit 559a8ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Rhino.ServiceBus/RhinoQueues/RhinoQueuesTransport.cs
Expand Up @@ -26,7 +26,7 @@ public class RhinoQueuesTransport : ITransport
{
public const int ANY_AVAILABLE_PORT = 9; //This is the Discard Protocol port. No bus should ever listen on it, so we will use it for our marker port.

private readonly Uri endpoint;
private Uri endpoint;
private readonly IEndpointRouter endpointRouter;
private readonly IMessageSerializer messageSerializer;
private readonly int threadCount;
Expand Down Expand Up @@ -148,7 +148,11 @@ public void Start()
port = 2200;

if (port == ANY_AVAILABLE_PORT)
{
ConfigureAndStartPortManagerOnAnyAvailablePort();
port = queueManager.Endpoint.Port;
endpoint = new Uri(endpoint.OriginalString.Replace(endpoint.Host + ":" + ANY_AVAILABLE_PORT, endpoint.Host + ":" + port));
}
else
ConfigureAndStartQueueManager(port);

Expand Down

0 comments on commit 559a8ad

Please sign in to comment.