Skip to content

Commit 28a72b9

Browse files
committed
[Modify] Throw exception
1 parent 9c2b8dc commit 28a72b9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

websocket-sharp/Server/WebSocketServer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,11 @@ public bool ReuseAddress {
591591
/// </value>
592592
public ServerSslConfiguration SslConfiguration {
593593
get {
594+
if (!_secure) {
595+
var msg = "This instance does not provide secure connections.";
596+
throw new InvalidOperationException (msg);
597+
}
598+
594599
if (_sslConfig == null)
595600
_sslConfig = new ServerSslConfiguration ();
596601

0 commit comments

Comments
 (0)