Skip to content

Commit

Permalink
Merged bug23013 into default
Browse files Browse the repository at this point in the history
  • Loading branch information
Emile Joubert committed Aug 10, 2010
2 parents 5a2c068 + 853ce08 commit 6e2af4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ namespace RabbitMQ.Client
public class AmqpTcpEndpoint
{
///<summary>Indicates that the default port for the protocol should be used</summary>
public const int DefaultAmqpSslPort = 5671;
public const int UseDefaultPort = -1;

private IProtocol m_protocol;
Expand All @@ -98,7 +99,13 @@ public string HostName
///port number for the IProtocol to be used.</summary>
public int Port
{
get { return (m_port == UseDefaultPort) ? m_protocol.DefaultPort : m_port; }
get {
if (m_port != UseDefaultPort)
return m_port;
if (m_ssl.Enabled)
return DefaultAmqpSslPort;
return m_protocol.DefaultPort;
}
set { m_port = value; }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,14 @@ public AmqpTcpEndpoint Endpoint
{
get
{
return new AmqpTcpEndpoint(Protocol, HostName, Port);
return new AmqpTcpEndpoint(Protocol, HostName, Port, Ssl);
}
set
{
Protocol = value.Protocol;
Port = value.Port;
HostName = value.HostName;
Ssl = value.Ssl;
}
}

Expand Down

0 comments on commit 6e2af4e

Please sign in to comment.