From 6d765b08e36ea9e8f8b0765e07f51612e857621d Mon Sep 17 00:00:00 2001 From: Alex Mace Date: Thu, 7 May 2015 17:00:07 +0100 Subject: [PATCH] 65137 was fixed in PHP 5.6.8, so this code now fails on that version --- src/StreamEncryption.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;