Skip to content

Commit

Permalink
add codecov.yml, fix error (#4232)
Browse files Browse the repository at this point in the history
  • Loading branch information
matyhtf committed May 22, 2021
1 parent 7ca38ff commit 7501396
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore:
- "src/core/error.cc"
2 changes: 1 addition & 1 deletion ext-src/swoole_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3468,7 +3468,7 @@ static PHP_METHOD(swoole_server, sendMessage) {
php_swoole_fatal_error(E_WARNING, "can't send messages to self");
RETURN_FALSE;
}
if (worker_id < 0 && worker_id >= serv->worker_num + serv->task_worker_num) {
if (worker_id < 0 || worker_id >= serv->worker_num + serv->task_worker_num) {
php_swoole_fatal_error(E_WARNING, "worker_id[%d] is invalid", (int) worker_id);
RETURN_FALSE;
}
Expand Down

0 comments on commit 7501396

Please sign in to comment.