Skip to content
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

NBD handle fatal errors in async read/write operations #20

Open
jimmyaxod opened this issue Jul 17, 2024 · 1 comment
Open

NBD handle fatal errors in async read/write operations #20

jimmyaxod opened this issue Jul 17, 2024 · 1 comment

Comments

@jimmyaxod
Copy link
Contributor

jimmyaxod commented Jul 17, 2024

// TODO: Context, and handle fatal errors

The fatal channel is used here


AND

It is only used when executing asynchronous reads and writes, if it can't send the response, the error gets put in this channel.

The main Handle() dispatch loop should check the fatal channel, and if there was an error, return from Handle() with that error.
eg insert a select here

// fmt.Printf("Read from [%d in, %d out] %v\n", d.packets_in, d.packets_out, d.fp)

@jimmyaxod
Copy link
Contributor Author

We should also change this:

_ = d.Handle()

To not ignore errors from handlers, then we'll need to do something with that error.... what? Log it would be a start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant