File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
projects/client/RabbitMQ.Client/src/client/api Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ namespace RabbitMQ.Client
74
74
public class AmqpTcpEndpoint
75
75
{
76
76
///<summary>Indicates that the default port for the protocol should be used</summary>
77
+ public const int DefaultAMQPSSLPort = 5671 ;
77
78
public const int UseDefaultPort = - 1 ;
78
79
79
80
private IProtocol m_protocol ;
@@ -98,7 +99,13 @@ public string HostName
98
99
///port number for the IProtocol to be used.</summary>
99
100
public int Port
100
101
{
101
- get { return ( m_port == UseDefaultPort ) ? m_protocol . DefaultPort : m_port ; }
102
+ get {
103
+ if ( m_port != UseDefaultPort )
104
+ return m_port ;
105
+ if ( m_ssl . Enabled )
106
+ return DefaultAMQPSSLPort ;
107
+ return m_protocol . DefaultPort ;
108
+ }
102
109
set { m_port = value ; }
103
110
}
104
111
Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ public AmqpTcpEndpoint Endpoint
172
172
Protocol = value . Protocol ;
173
173
Port = value . Port ;
174
174
HostName = value . HostName ;
175
+ Ssl = value . Ssl ;
175
176
}
176
177
}
177
178
You can’t perform that action at this time.
0 commit comments