--TEST-- swoole_client: getSocket debug --SKIPIF-- --INI-- assert.active=1 assert.warning=1 assert.bail=0 assert.quiet_eval=0 --FILE-- on("connect", function(swoole_client $cli) { // getSocket BUG $cli->getSocket(); $cli->getSocket(); echo "SUCCESS"; /* @$cli->getSocket(); $err = error_get_last(); assert($err["message"] === "swoole_client_async::getSocket(): unable to obtain socket family Error: Bad file descriptor[9]."); */ swoole_event_exit(); }); $cli->on("receive", function(swoole_client $cli, $data){}); $cli->on("error", function(swoole_client $cli) {echo "error\n";}); $cli->on("close", function(swoole_client $cli) {}); $cli->connect(TCP_SERVER_HOST, TCP_SERVER_PORT, 1); Swoole\Event::wait(); ?> --EXPECT-- SUCCESS