Skip to content
Open
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
6 changes: 5 additions & 1 deletion src/auth/oauth2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,14 @@ impl Inner {
$field: $field.clone(),
)*
};
cx.waker().wake_by_ref();
break Poll::Pending;
}
},
Poll::Pending => break Poll::Pending,
Poll::Pending => {
cx.waker().wake_by_ref();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just realized, I think only the above wake is necessary. In this case the inner future being polled is responsible for waking.

Copy link
Copy Markdown
Author

@quettabit quettabit Mar 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid point. i assumed the inner future was not doing its job and just added one here. this fixes the issue, but i don't have a valid reasoning about the fix itself though. also, there is a possibility that the issue could be stemming from somewhere else in the library.

the issue -- without this wake, when application-level tasks attempt to fetch the token concurrently, the tasks get hanged after fetching the token and doesn't progress further.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you try to create a minimal repro?

break Poll::Pending;
}
}
};
}
Expand Down