Fix SocketClient checking for more data, now that we buffer received data
This commit is contained in:
@@ -502,7 +502,7 @@ final class SocketClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* See if we there is data waiting to collect, or if we can send
|
||||
* See if there is data waiting to collect, or if we can send
|
||||
*
|
||||
* @param bool $read
|
||||
* @param bool $write
|
||||
@@ -512,6 +512,9 @@ final class SocketClient {
|
||||
*/
|
||||
public function ttySelect(bool $read,bool $write, int $timeout): int
|
||||
{
|
||||
if (strlen($this->rx_buf) && ($this->rx_left))
|
||||
return 1;
|
||||
|
||||
$read = $read ? [$this->connection] : NULL;
|
||||
$write = $write ? [$this->connection] : NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user