-
Notifications
You must be signed in to change notification settings - Fork 115
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
UdpFramed doesn't return incoming frames #305
Comments
It is ok since you wrote an infinite loop in your code: loop {
match self.data.poll() {
...
Ok(Async::NotReady) => {
continue;
},
...
};
} |
I would recommend you to read udp-codec example. |
@kpp If you read the entire linked issue this always returned If switched to a for loop over The infinite Furthermore that protocol (or at least the implementation) that I'm working with requires no responses so I'm not sure how the example is strictly applicable. But thank you for it. |
@valarauca What version of tokio-core? There was a release earlier today w/ a bug fix that might be related. |
So I've implemented a simple server here. You can build this with
cargo build
and running it takes a--socket
argument for the address it should listen on.The goal was to test a udp based syslog application. All this really does is check the UTF8 datagrams to valid strings, and print them.
The problem is I see 1 datagram, then it just consumes 100% cpu infinitely spinning on a single core. I can see in wireshark that my remote services are still sending packets, but the only data I'm seeing is
Async::NotReady
.netstat -vaun
shows myself listening on the expected port and that it is open.There isn't every anything to encode, I'm just looking for a stream of incoming datagrams.
version info:
display idenatical behavior. I'm on Ubuntu 16.04.04 (kernel 4.4.0-116-generic)
Update sometimes I just see no frames, have a port open, and packets hitting the port, and I'm still spinning at 100% cpu with no data.
The text was updated successfully, but these errors were encountered: