[Modify] Remove it and throw exception

master
sta 8 years ago
parent bbc70c5314
commit 4c9f443bea

@ -651,23 +651,20 @@ namespace WebSocketSharp
/// </value> /// </value>
public ClientSslConfiguration SslConfiguration { public ClientSslConfiguration SslConfiguration {
get { get {
return _client if (!_client) {
? (_sslConfig ?? (_sslConfig = new ClientSslConfiguration (_uri.DnsSafeHost))) var msg = "This instance is not a client.";
: null; throw new InvalidOperationException (msg);
} }
set { if (!_secure) {
lock (_forState) { var msg = "The connection is not secure.";
string msg; throw new InvalidOperationException (msg);
if (!checkIfAvailable (true, false, true, false, false, true, out msg)) { }
_logger.Error (msg);
error ("An error has occurred in setting the ssl configuration.", null);
return; if (_sslConfig == null)
} _sslConfig = new ClientSslConfiguration (_uri.DnsSafeHost);
_sslConfig = value; return _sslConfig;
}
} }
} }

Loading…
Cancel
Save