And after this commit:
https://gitlab.com/nbdkit/libnbd/-/commit/3a49373a78a611af7497f76b797c78d612f47c84
You can use a with-style to automatically close the handle:
with nbd.nbd() as h:
# use the handle 'h'
Rich.
--
Richard Jones, Virtualization Group, Red Hat
On Sat, Feb 25, 2023 at 09:57:41AM +, Richard W.M. Jones wrote:
> I can have a go at adding this since I unexpectedly have some free
> time this weekend.
https://gitlab.com/nbdkit/libnbd/-/commit/b7f85610ac19085a1631439fbcb7dd241f1e9ebf
On Fri, Feb 24, 2023 at 04:41:20PM -0600, Eric Blake wrote:
> I'm out of time this weekend, but while trying to write a test for an
> nbdkit bug fix (a nasty assertion failure when the client disconnects
> uncleanly without NBD_CMD_DISC, which is what nbdcopy does if it gets
> an EIO read response
I'm out of time this weekend, but while trying to write a test for an
nbdkit bug fix (a nasty assertion failure when the client disconnects
uncleanly without NBD_CMD_DISC, which is what nbdcopy does if it gets
an EIO read response from the server), I realized it is extremely hard
to trigger this