Skip to content

Commit

Permalink
Merge pull request #3257 from MediaBrowser/dev
Browse files Browse the repository at this point in the history
update HttpConnection
  • Loading branch information
LukePulverenti authored May 2, 2018
2 parents 389775d + 17496ad commit aab1b82
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion SocketHttpListener/Net/HttpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ public async Task Init()
{
if (ssl_stream != null)
{
ssl_stream.AuthenticateAsServer(cert, false, (SslProtocols)ServicePointManager.SecurityProtocol, false);
var enableAsync = true;
if (enableAsync)
{
await ssl_stream.AuthenticateAsServerAsync(cert, false, (SslProtocols)ServicePointManager.SecurityProtocol, false).ConfigureAwait(false);
}
else
{
ssl_stream.AuthenticateAsServer(cert, false, (SslProtocols)ServicePointManager.SecurityProtocol, false);
}
}

InitInternal();
Expand Down

0 comments on commit aab1b82

Please sign in to comment.