Move the call to SslStream.AuthenticateAsServer() into the constructor because
we don't want to call it again when Init() is called from Close().
stream = ssl_stream;
}
timer = new Timer (OnTimeout, null, Timeout.Infinite, Timeout.Infinite);
+ if (ssl_stream != null)
+ ssl_stream.AuthenticateAsServer (cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
Init ();
}
void Init ()
{
- if (ssl_stream != null) {
- ssl_stream.AuthenticateAsServer (cert, true, (SslProtocols)ServicePointManager.SecurityProtocol, false);
- }
-
context_bound = false;
i_stream = null;
o_stream = null;