diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 270b859a..c101b609 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -630,6 +630,11 @@ namespace WebSocketSharp.Server /// public ServerSslConfiguration SslConfiguration { get { + if (!_secure) { + var msg = "This instance does not provide secure connections."; + throw new InvalidOperationException (msg); + } + return _listener.SslConfiguration; } }