[Modify] Replace it
This commit is contained in:
parent
2e146900c6
commit
f514c5244f
@ -1201,23 +1201,10 @@ namespace WebSocketSharp.Server
|
|||||||
/// </exception>
|
/// </exception>
|
||||||
public void Start ()
|
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)
|
if (_state == ServerState.Start || _state == ServerState.ShuttingDown)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
start (sslConfig);
|
start ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user