From 73a0b51c09b97b8ff68c09cda1f8525b2cca2023 Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 18 Oct 2017 15:05:18 +0900 Subject: [PATCH] [Modify] Throw exception --- websocket-sharp/Server/HttpServer.cs | 5 +++++ 1 file changed, 5 insertions(+) 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; } }