diff --git a/src/StreamEncryption.php b/src/StreamEncryption.php index f7de6f5..38918bb 100644 --- a/src/StreamEncryption.php +++ b/src/StreamEncryption.php @@ -30,7 +30,9 @@ public function __construct(LoopInterface $loop) // https://github.com/reactphp/socket-client/issues/24 // On versions affected by this bug we need to fread the stream until we // get an empty string back because the buffer indicator could be wrong - $this->wrapSecure = true; + if (version_compare(PHP_VERSION, '5.6.8', '<')) { + $this->wrapSecure = true; + } if (defined('STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT')) { $this->method |= STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT;