aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Tomasina <tomasina@plab.io>2016-10-11 00:26:20 +0200
committerPierre Tomasina <tomasina@plab.io>2016-10-11 00:26:20 +0200
commit1a00f8c70aa5908be538e5521d9f9fba05021c7b (patch)
treec9b24908ffcca59b5a174bb5d504eaf91671d725
parent4d14eab3976a3dea620e83bcb7a24342d3532f31 (diff)
downloadWebsocket-1a00f8c70aa5908be538e5521d9f9fba05021c7b.zip
Websocket-1a00f8c70aa5908be538e5521d9f9fba05021c7b.tar.gz
Websocket-1a00f8c70aa5908be538e5521d9f9fba05021c7b.tar.bz2
prevent already encrypted connection
-rw-r--r--Server.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/Server.php b/Server.php
index 6afe34f..86f1227 100644
--- a/Server.php
+++ b/Server.php
@@ -90,7 +90,9 @@ class Server extends Connection
{
$connection = $this->getConnection();
- if (true === $connection->getSocket()->isSecured()) {
+ if (true === $connection->getSocket()->isSecured()
+ && false === $connection->isEncrypted()
+ ) {
$connection->enableEncryption(true, $connection::ENCRYPTION_TLS);
}