Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump codecov to v4 #1885

Merged
merged 4 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: cd build && ctest --output-on-failure

- name: Upload report
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
yml: ./.codecov.yml
Expand Down
5 changes: 3 additions & 2 deletions src/core/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,12 +755,13 @@ nni_sleep_aio(nng_duration ms, nng_aio *aio)
default:
// If the timeout on the aio is shorter than our sleep time,
// then let it still wake up early, but with NNG_ETIMEDOUT.
if (ms > aio->a_timeout) {
if ((ms == NNG_DURATION_INFINITE) || (ms > aio->a_timeout)) {
aio->a_expire_ok = false;
ms = aio->a_timeout;
}
}
aio->a_expire = nni_clock() + ms;
aio->a_expire =
ms == NNG_DURATION_INFINITE ? NNI_TIME_NEVER : nni_clock() + ms;

if ((rv = nni_aio_schedule(aio, nni_sleep_cancel, NULL)) != 0) {
nni_aio_finish_error(aio, rv);
Expand Down
4 changes: 2 additions & 2 deletions src/core/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,8 +1485,8 @@ dialer_timer_start_locked(nni_dialer *d)
// This algorithm may lead to slight biases because we don't
// have a statistically perfect distribution with the modulo of
// the random number, but this really doesn't matter.
nni_sleep_aio(
back_off ? (int) nni_random() % back_off : 0, &d->d_tmo_aio);
nni_sleep_aio(back_off ? (nng_duration) (nni_random() % back_off) : 0,
&d->d_tmo_aio);
}

void
Expand Down
6 changes: 6 additions & 0 deletions src/sp/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ extern void nni_sp_tcp_register(void);
#ifdef NNG_TRANSPORT_TLS
extern void nni_sp_tls_register(void);
#endif
#ifdef NNG_TRANSPORT_UDP
extern void nni_sp_udp_register(void);
#endif
#ifdef NNG_TRANSPORT_WS
extern void nni_sp_ws_register(void);
#endif
Expand Down Expand Up @@ -91,6 +94,9 @@ nni_sp_tran_sys_init(void)
#ifdef NNG_TRANSPORT_TLS
nni_sp_tls_register();
#endif
#ifdef NNG_TRANSPORT_UDP
nni_sp_udp_register();
#endif
#ifdef NNG_TRANSPORT_WS
nni_sp_ws_register();
#endif
Expand Down
Loading