Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit b9608bd

Browse files
authored
Merge pull request #19487 from baulig/work-httplistener-52508
Fix Mono bug #52508 in HttpListener when doing multiple Https request.
2 parents 3f50597 + 4959005 commit b9608bd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/System.Net.HttpListener/src/System/Net/Managed/HttpConnection.cs

+3-5
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public HttpConnection(Socket sock, HttpEndPointListener epl, bool secure, X509Ce
103103
}
104104

105105
_timer = new Timer(OnTimeout, null, Timeout.Infinite, Timeout.Infinite);
106+
if (_sslStream != null) {
107+
_sslStream.AuthenticateAsServer (_cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
108+
}
106109
Init();
107110
}
108111

@@ -123,11 +126,6 @@ internal SslStream SslStream
123126

124127
private void Init()
125128
{
126-
if (_sslStream != null)
127-
{
128-
_sslStream.AuthenticateAsServer(_cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
129-
}
130-
131129
_contextBound = false;
132130
_requestStream = null;
133131
_responseStream = null;

0 commit comments

Comments
 (0)