diff options
| author | ruki <[email protected]> | 2019-12-14 00:46:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-12-13 22:37:35 +0800 |
| commit | 26ea5a3e4a0a474366e879b529d6f0a2c918ef2d (patch) | |
| tree | bb1964bc50281bf09f83c1eab44827fe01756a65 /tests/modules/socket/sched_tcp/echo_client.lua | |
| parent | 4f171e9e2b1eb119b43f08db23c9e6f271f9021d (diff) | |
add file_server and file_client tests for scheduler/socket
Diffstat (limited to 'tests/modules/socket/sched_tcp/echo_client.lua')
| -rw-r--r-- | tests/modules/socket/sched_tcp/echo_client.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/modules/socket/sched_tcp/echo_client.lua b/tests/modules/socket/sched_tcp/echo_client.lua index 77b76a0f3..af40a085d 100644 --- a/tests/modules/socket/sched_tcp/echo_client.lua +++ b/tests/modules/socket/sched_tcp/echo_client.lua @@ -17,7 +17,9 @@ function _session(addr, port) end print("%s: send ok, count: %d!", sock, count) sock:close() - scheduler.stop() + if scheduler.co_count() == 1 then + scheduler.stop() + end end function main(count) |
