diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-10 13:07:01 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-04-10 13:07:01 +0200 |
| commit | c02a5931f4ca7565a83454010a2cbc5d95be9e11 (patch) | |
| tree | 25368d9817f33a237f36cda7df0201f377007e08 /ext/pgsql/tests | |
| parent | 2191eac3b3c4b393235e126e84aac9eaae230c2d (diff) | |
| parent | b67ca4f07c0171a503d8d4b040a3e51869b2a512 (diff) | |
| download | php-git-c02a5931f4ca7565a83454010a2cbc5d95be9e11.tar.gz | |
Merge branch 'PHP-7.3' into PHP-7.4
Diffstat (limited to 'ext/pgsql/tests')
| -rw-r--r-- | ext/pgsql/tests/29nb_async_connect.phpt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/pgsql/tests/29nb_async_connect.phpt b/ext/pgsql/tests/29nb_async_connect.phpt index fc3868a26d..a9b17ebc3a 100644 --- a/ext/pgsql/tests/29nb_async_connect.phpt +++ b/ext/pgsql/tests/29nb_async_connect.phpt @@ -23,18 +23,20 @@ if (!$db = pg_connect($conn_str, PGSQL_CONNECT_ASYNC)) { while (TRUE) { switch ($status = pg_connect_poll($db)) { case PGSQL_POLLING_READING: - if (nb_is_readable($db_socket)) { break 2; } + nb_is_readable($db_socket); break; case PGSQL_POLLING_WRITING: - if (nb_is_writable($db_socket)) { break 2; } + nb_is_writable($db_socket); break; case PGSQL_POLLING_FAILED: die("async connection failed"); case PGSQL_POLLING_OK: break 2; + default: + die("unknown poll status"); } } -assert(pg_connection_status($db) === PGSQL_CONNECTION_MADE); +assert(pg_connection_status($db) === PGSQL_CONNECTION_OK); echo "OK"; pg_close($db); |
