<commit_before>--TEST--
swoole_client_sync: eof timeout
--SKIPIF--
<?php require  __DIR__ . "/../include/skipif.inc"; ?>
--FILE--
<?php
require_once __DIR__ . "/../include/swoole.inc";
require_once __DIR__ . "/../include/lib/curl.php";

$pm = new ProcessManager;

ini_set("swoole.display_errors", "Off");

$pm->parentFunc = function ($pid)
{
    $cli = new Swoole\Client(SWOOLE_SOCK_TCP);
    $cli->set(['open_eof_check' => true, "package_eof" => "\r\n\r\n"]);
    if (!$cli->connect('127.0.0.1', 9502, 0.5))
    {
        fail:
        echo "ERROR\n";
        return;
    }
    //no eof, should be timeout here
    if (!$cli->send("hello"))
    {
        goto fail;
    }
    $ret = $cli->recv();<commit_msg>kill process.<commit_after>--TEST--
swoole_client_sync: eof timeout
--SKIPIF--
<?php require  __DIR__ . "/../include/skipif.inc"; ?>
--FILE--
<?php
require_once __DIR__ . "/../include/swoole.inc";
require_once __DIR__ . "/../include/lib/curl.php";

$pm = new ProcessManager;

ini_set("swoole.display_errors", "Off");

$pm->parentFunc = function ($pid)
{
    $cli = new Swoole\Client(SWOOLE_SOCK_TCP);
    $cli->set(['open_eof_check' => true, "package_eof" => "\r\n\r\n"]);
    if (!$cli->connect('127.0.0.1', 9502, 0.5))
    {
        fail:
        echo "ERROR\n";
        swoole_process::kill($pid);
        return;
    }
    //no eof, should be timeout here
    if (!$cli->send("hello"))
    {
        goto fail;
    }
    $ret = $cli->recv();
{'fraction_non_alphanumeric': 0.2111416781292985, 'fraction_numerical': 0.016506189821182942, 'mean_word_length': 2.6375, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2389385', 'n_tokens_mistral': 573, 'n_tokens_neox': 561, 'n_words': 105}