Skip to content

Commit

Permalink
65137 was fixed in PHP 5.6.8, so this code now fails on that version
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmace committed May 7, 2015
1 parent 8f86fa0 commit fae5591
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/StreamEncryption.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit fae5591

Please sign in to comment.