Skip to content

Commit

Permalink
chore: lower timeout to pass the tests
Browse files Browse the repository at this point in the history
Should probably have another drop sender here.
  • Loading branch information
Joonas Koivunen committed Mar 25, 2020
1 parent d486157 commit cb49ee8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http/src/v0/pubsub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,15 @@ async fn shovel<T: IpfsTypes>(
topic
);

// needs to be mut so that we resubscribe
let one_second = Duration::from_millis(1000);
// related conformance test waits for 100ms
let check_every = Duration::from_millis(50);

loop {
// has the underlying stream been stopped by directly calling
// `Ipfs::pubsub_unsubscribe`
let mut unsubscribed = true;
loop {
let next = match timeout(one_second, shoveled.next()).await {
let next = match timeout(check_every, shoveled.next()).await {
Ok(Some(next)) => preformat(next),
Ok(None) => break,
Err(_) => {
Expand Down

0 comments on commit cb49ee8

Please sign in to comment.