rust-vmm / vhost-device

'vhost-user' device backends workspace
Apache License 2.0
68 stars 48 forks source link

check if we get '\n' early while reading from socket #663

Closed ramyak-mehra closed 5 months ago

ramyak-mehra commented 6 months ago

fixes #307 Signed-off-by: Ramyak Mehra ramyakmehra10@gmail.com

Summary of the PR

Requirements

Before submitting your PR, please make sure you addressed the following requirements:

stefano-garzarella commented 5 months ago

@ramyak-mehra please take a loot at the CI issue, it looks like there is an unnecessary include.

The description is a bit cryptic, we could rewrite it into something like this:

Before this change, we read a fixed number of bytes before checking `\n`.
If the user provided less than that, the application would wait indefinitely.

Let`s remove this limitation by using buffered reading and checking `\n`
from the beginning of the input.

Fixes: #307

Please remember to add the Fixes tag also in the commit description.

stsquad commented 5 months ago

The code is a definite improvement on what it replaces. However you also need to ensure the old dependencies that are no longer needed are cleaned up. That's the reason the CI is failing.

ramyak-mehra commented 5 months ago

Sorry I didn't have my usual linux setup available resulting in so many iteration loop.