Skip to content

Commit

Permalink
Remove HHVM compatibility code
Browse files Browse the repository at this point in the history
Since HHVM no longer supports PHP and the dependencies have been updated.
  • Loading branch information
fuzqing authored Feb 4, 2025
1 parent 9f11e98 commit d325b24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/Connection/AsyncTcpConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,7 @@ public function checkConnection(): void
}
// Nonblocking.
stream_set_blocking($this->socket, false);
// Compatible with hhvm
if (function_exists('stream_set_read_buffer')) {
stream_set_read_buffer($this->socket, 0);
}
stream_set_read_buffer($this->socket, 0);
// Try to open keepalive for tcp and disable Nagle algorithm.
if (function_exists('socket_import_stream') && $this->transport === 'tcp') {
$socket = socket_import_stream($this->socket);
Expand Down
5 changes: 1 addition & 4 deletions src/Connection/TcpConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,7 @@ public function __construct(EventInterface $eventLoop, $socket, string $remoteAd
}
$this->socket = $socket;
stream_set_blocking($this->socket, false);
// Compatible with hhvm
if (function_exists('stream_set_read_buffer')) {
stream_set_read_buffer($this->socket, 0);
}
stream_set_read_buffer($this->socket, 0);
$this->eventLoop = $eventLoop;
$this->eventLoop->onReadable($this->socket, $this->baseRead(...));
$this->maxSendBufferSize = self::$defaultMaxSendBufferSize;
Expand Down

0 comments on commit d325b24

Please sign in to comment.