[Modify] Polish it

This commit is contained in:
sta 2018-08-07 19:52:35 +09:00
parent 2486492ae7
commit 104d59cb93

View File

@ -833,18 +833,14 @@ namespace WebSocketSharp.Server
var path = _listener.CertificateFolderPath;
var withPort = EndPointListener.CertificateExists (_port, path);
var both = byUser && withPort;
if (both) {
_log.Warn ("The server certificate associated with the port is used.");
return true;
}
var either = byUser || withPort;
if (!either) {
if (!(byUser || withPort)) {
message = "There is no server certificate for secure connection.";
return false;
}
if (byUser && withPort)
_log.Warn ("The server certificate associated with the port is used.");
return true;
}