-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update version for Swoole 4.5.10 (#3951)
* Fix connection_list error (#3948) * Update version for Swoole 4.5.10 * Fix name uninitialized
- Loading branch information
1 parent
6eb7ddc
commit 57c7112
Showing
5 changed files
with
97 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,10 +42,10 @@ | |
<email>[email protected]</email> | ||
<active>yes</active> | ||
</developer> | ||
<date>2020-11-26</date> | ||
<time>00:00:00</time> | ||
<date>2020-12-22</date> | ||
<time>09:00:00</time> | ||
<version> | ||
<release>4.5.9</release> | ||
<release>4.5.10</release> | ||
<api>4.0</api> | ||
</version> | ||
<stability> | ||
|
@@ -54,13 +54,11 @@ | |
</stability> | ||
<license uri="http://www.apache.org/licenses/LICENSE-2.0.html">Apache2.0</license> | ||
<notes> | ||
Enhancement | ||
--- | ||
+ Added SWOOLE_HTTP_CLIENT_ESTATUS_SEND_FAILED constant for Coroutine\\Http\\Client (#3873) (@sy-records) | ||
|
||
Fixed | ||
--- | ||
* Fixed PHP8 compatibility (#3868) (#3869) (#3872) (@twose) (@huanghantao) (@doubaokun) | ||
* Fixed #3906, sync master (93901dc0) (@matyhtf) | ||
* Fixed PHP8 compatibility (f0dc6d32) (@matyhtf) | ||
* Fixed connection_list error (#3948) (@sy-records) | ||
</notes> | ||
<contents> | ||
<dir name="/"> | ||
|
@@ -1515,6 +1513,7 @@ | |
<file role="test" name="tests/swoole_server/close_in_connect_callback.phpt" /> | ||
<file role="test" name="tests/swoole_server/close_in_non_current_worker.phpt" /> | ||
<file role="test" name="tests/swoole_server/close_in_task_worker.phpt" /> | ||
<file role="test" name="tests/swoole_server/close_max_fd.phpt" /> | ||
<file role="test" name="tests/swoole_server/close_queued.phpt" /> | ||
<file role="test" name="tests/swoole_server/connections.phpt" /> | ||
<file role="test" name="tests/swoole_server/discard_timeout_packet.phpt" /> | ||
|
@@ -1907,6 +1906,7 @@ | |
<file role="src" name="travis/pecl-install.sh" /> | ||
<file role="src" name="travis/route.sh" /> | ||
<file role="src" name="travis/run-tests.sh" /> | ||
<file role="src" name="travis/simple-compile-on-github.sh" /> | ||
<file role="src" name="travis/simple-compile.sh" /> | ||
</dir> | ||
</contents> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--TEST-- | ||
swoole_server: close_max_fd | ||
--SKIPIF-- | ||
<?php require __DIR__ . '/../include/skipif.inc'; ?> | ||
--FILE-- | ||
<?php | ||
require __DIR__ . '/../include/bootstrap.php'; | ||
|
||
use Swoole\Server; | ||
|
||
$pm = new SwooleTest\ProcessManager; | ||
$pm->parentFunc = function () use ($pm) { | ||
Co\run(function () use ($pm) { | ||
go(function() use ($pm) { | ||
$client = new Co\Client(SWOOLE_SOCK_TCP); | ||
Assert::assert($client->connect('127.0.0.1', $pm->getFreePort())); | ||
Assert::assert($client->send('test')); | ||
$client->recv(); | ||
Co::sleep(2); | ||
$client->send('ping'); | ||
Co::sleep(2); | ||
$pm->kill(); | ||
}); | ||
go(function() use ($pm) { | ||
$cli = new Co\Http\Client('127.0.0.1', $pm->getFreePort()); | ||
}); | ||
go(function() use ($pm) { | ||
$client = new Co\Client(SWOOLE_SOCK_TCP); | ||
Assert::assert($client->connect('127.0.0.1', $pm->getFreePort())); | ||
$client->send('test2'); | ||
}); | ||
}); | ||
}; | ||
$pm->childFunc = function () use ($pm) { | ||
$server = new Swoole\Server('127.0.0.1', $pm->getFreePort()); | ||
$server->set([ | ||
'worker_num' => 1, | ||
'log_level' => SWOOLE_LOG_ERROR, | ||
]); | ||
|
||
$server->on('receive', function (Swoole\Server $serv, int $fd, int $rid, string $data) { | ||
var_dump($data); | ||
var_dump($serv->getClientList()); | ||
Assert::true(!empty($serv->getClientList())); | ||
foreach ($serv->connections as $_fd) { | ||
var_dump("fd:{$_fd}"); | ||
} | ||
$serv->send($fd, "Server: " . $data); | ||
}); | ||
|
||
$server->on('Close', function ($server, $fd) { | ||
echo "Client:{$fd} Close.\n"; | ||
}); | ||
|
||
$server->start(); | ||
}; | ||
$pm->childFirst(); | ||
$pm->run(); | ||
?> | ||
--EXPECT-- | ||
string(4) "test" | ||
array(2) { | ||
[0]=> | ||
int(1) | ||
[1]=> | ||
int(2) | ||
} | ||
string(4) "fd:1" | ||
string(4) "fd:2" | ||
string(5) "test2" | ||
array(2) { | ||
[0]=> | ||
int(1) | ||
[1]=> | ||
int(2) | ||
} | ||
string(4) "fd:1" | ||
string(4) "fd:2" | ||
Client:2 Close. | ||
string(4) "ping" | ||
array(1) { | ||
[0]=> | ||
int(1) | ||
} | ||
string(4) "fd:1" | ||
Client:1 Close. |