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

handle_storage_next_timeout_get essential to proper function #177

Open
dholth opened this issue Apr 12, 2017 · 1 comment
Open

handle_storage_next_timeout_get essential to proper function #177

dholth opened this issue Apr 12, 2017 · 1 comment
Labels

Comments

@dholth
Copy link
Contributor

dholth commented Apr 12, 2017

I'm doing a little event queue simulation with trickle.c that was calling trickle_tx_timeout() at every step with t_now incrementing by 1 each step. If t_now starts at zero it transmits a modest number of packets, but if t_now starts at e.g. 4096, trickle_tx_timout() returns 'transmit now' very often.

The fix is to wait until min(trickle.t) before calling trickle_tx_timeout() as in order_next_transmission()

Should trickle_tx_timeout() work when called (many times) before trickle->t?

Thanks.

@trond-snekvik
Copy link
Contributor

Hi,
You're correct, the trickle_tx_timeout() function is meant to be called when the timeout occurs, as it doesn't check the time itself before making the decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants