File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,15 @@ public SocketFrameHandler_0_9(AmqpTcpEndpoint endpoint)
81
81
// disable Nagle's algorithm, for more consistently low latency
82
82
m_socket . NoDelay = true ;
83
83
84
- Stream netstream = endpoint . Ssl . Enabled ?
85
- SslHelper . TcpUpgrade ( m_socket . GetStream ( ) , endpoint . Ssl ) :
86
- m_socket . GetStream ( ) ;
87
-
84
+ Stream netstream = m_socket . GetStream ( ) ;
85
+ if ( endpoint . Ssl . Enabled ) {
86
+ try {
87
+ netstream = SslHelper . TcpUpgrade ( netstream , endpoint . Ssl ) ;
88
+ } catch ( Exception ) {
89
+ Close ( ) ;
90
+ throw ;
91
+ }
92
+ }
88
93
m_reader = new NetworkBinaryReader ( new BufferedStream ( netstream ) ) ;
89
94
m_writer = new NetworkBinaryWriter ( new BufferedStream ( netstream ) ) ;
90
95
}
You can’t perform that action at this time.
0 commit comments