Kevin Wolf <kw...@redhat.com> wrote: > Am 24.03.2023 um 11:47 hat Florian Westphal geschrieben: > > + qio_channel_set_cork(client->ioc, true); > > + > > if (ret < 0) { > > /* It wasn't -EIO, so, according to nbd_co_receive_request() > > * semantics, we should return the error to the client. */ > > @@ -2692,6 +2694,7 @@ static coroutine_fn void nbd_trip(void *opaque) > > goto disconnect; > > } > > > > + qio_channel_set_cork(client->ioc, false); > > done: > > nbd_request_put(req); > > nbd_client_put(client); > > In the error paths, we never call set_cork(false) again. I suppose the > reason that this is okay is because the next thing is actually that we > close the socket?
Yes, no need to uncork before close.