Skip to content

Commit 8bb6db3

Browse files
author
Tim Watson
committed
Merge bug26016 into stable
2 parents f1d1cf9 + ca383b5 commit 8bb6db3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

projects/client/RabbitMQ.Client/src/client/api/SslHelper.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ private bool CertificateValidationCallback(object sender,
8787

8888
///<summary>Upgrade a Tcp stream to an Ssl stream using the SSL options
8989
///provided</summary>
90-
public static Stream TcpUpgrade(Stream tcpStream, SslOption sslOption)
90+
public static Stream TcpUpgrade(Stream tcpStream, SslOption sslOption, int timeout)
9191
{
9292
SslHelper helper = new SslHelper(sslOption);
9393
SslStream sslStream = new SslStream(tcpStream, false,
@@ -98,6 +98,8 @@ public static Stream TcpUpgrade(Stream tcpStream, SslOption sslOption)
9898
sslOption.Certs,
9999
sslOption.Version,
100100
false);
101+
sslStream.ReadTimeout = timeout;
102+
sslStream.WriteTimeout = timeout;
101103

102104
return sslStream;
103105
}

projects/client/RabbitMQ.Client/src/client/impl/SocketFrameHandler_0_9.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public SocketFrameHandler_0_9(AmqpTcpEndpoint endpoint,
9292
{
9393
try
9494
{
95-
netstream = SslHelper.TcpUpgrade(netstream, endpoint.Ssl);
95+
netstream = SslHelper.TcpUpgrade(netstream, endpoint.Ssl, timeout);
9696
}
9797
catch (Exception)
9898
{

0 commit comments

Comments
 (0)