Skip to content

Commit 6d765b0

Browse files
committed
65137 was fixed in PHP 5.6.8, so this code now fails on that version
1 parent 5f41caa commit 6d765b0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/StreamEncryption.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public function __construct(LoopInterface $loop)
3030
// https://github.com/reactphp/socket-client/issues/24
3131
// On versions affected by this bug we need to fread the stream until we
3232
// get an empty string back because the buffer indicator could be wrong
33-
$this->wrapSecure = true;
33+
if (version_compare(PHP_VERSION, '5.6.8', '<')) {
34+
$this->wrapSecure = true;
35+
}
3436

3537
if (defined('STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT')) {
3638
$this->method |= STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT;

0 commit comments

Comments
 (0)