[Modify] Polish it

This commit is contained in:
sta 2021-08-24 19:38:41 +09:00
parent 3c9197de96
commit bd9ac32699

View File

@ -1322,10 +1322,12 @@ namespace WebSocketSharp.Server
if (_secure) {
sslConfig = new ServerSslConfiguration (getSslConfiguration ());
string msg;
if (!checkSslConfiguration (sslConfig, out msg))
if (sslConfig.ServerCertificate == null) {
var msg = "There is no server certificate for secure connection.";
throw new InvalidOperationException (msg);
}
}
start (sslConfig);