Improve nodes state (#917)

* Improve the state consistency in src/nodes

* Add a user data parameter to tasks

* Remove the tasks HashMap in CollectionStream

* Add TODO
This commit is contained in:
Pierre Krieger
2019-02-14 13:46:52 +01:00
committed by GitHub
parent b7fa7f38b1
commit 1100325e63
5 changed files with 131 additions and 252 deletions

View File

@ -30,7 +30,7 @@ use tokio_timer::{self, Delay};
use void::{Void, unreachable};
/// Delay between the moment we connect and the first time we identify.
const DELAY_TO_FIRST_ID: Duration = Duration::from_millis(500);
const DELAY_TO_FIRST_ID: Duration = Duration::from_secs(3600);
/// After an identification succeeded, wait this long before the next time.
const DELAY_TO_NEXT_ID: Duration = Duration::from_secs(5 * 60);
/// After we failed to identify the remote, try again after the given delay.