Closed Stargateur closed 2 years ago
Hello @Stargateur. I've not seen this problem before. Is your code available, or do you have a minimal reproducible test case you can share?
Do you know if your application only stops receiving packets, or does it lock up entirely?
The included example seems to work fine.
I try to repro from the example end up that it's using tokio::main
that trigger the problem:
#[tokio::main]
async fn main() {
let stream = start_new_stream().await;
let fut = stream.for_each(move |s| {
println!("{:?}", s);
futures::future::ready(())
});
fut.await;
}
Example use mono thread run time, mine use multi thread.
Do you know if your application only stops receiving packets, or does it lock up entirely?
The rest of my async code run properly. But my code that run pcap only capture 1 or sometime two then is never call again.
Thank you for the hint! I've made a failing test case and will see if I can track down what needs to be fixed.
@Stargateur, can you please try the most recent tokio-multithread
branch on my fork and let me know if it fixes your issues?
Look it's working, the example work, and my application to capture sip packet seem ok too. Thank for the fix. Be able to use tokio 1 is great.
On Sat, Oct 02, 2021 at 03:17:11AM -0700, Antoine wrote:
... my application to capture sip packet seem ok too. Thank for the fix.
And is that fix in this git repository?
It is OK to beat me up with the URL of the merge request that I missed.
Regards Stappers
@stappersg the previous fix was only in my fork as I waited for feedback from @Stargateur. PR #189 contains the fix, and should be clean enough to merge
I have merged @DanielRussell fix and pushed an update to 0.9.1
to crates.io
I update from 0.8 to 0.9 and just test today, my code capture one packet but nothing else.
git diff:
I even try remove filter, nothing work expect go back to 0.8. If anyone can confirm ?