[Modify] Replace it

This commit is contained in:
sta 2021-12-23 20:00:59 +09:00
parent 2e146900c6
commit f514c5244f

View File

@ -1201,23 +1201,10 @@ namespace WebSocketSharp.Server
/// </exception>
public void Start ()
{
ServerSslConfiguration sslConfig = null;
if (_secure) {
var src = getSslConfiguration ();
sslConfig = new ServerSslConfiguration (src);
if (sslConfig.ServerCertificate == null) {
var msg = "There is no server certificate for secure connection.";
throw new InvalidOperationException (msg);
}
}
if (_state == ServerState.Start || _state == ServerState.ShuttingDown)
return;
start (sslConfig);
start ();
}
/// <summary>