[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler |
Date: |
Thu, 18 Jan 2018 10:44:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 18/01/2018 10:41, klim wrote:
>>>
>>> I propose to install a separate pullhup watcher regardless of
>>> whether the device waits for data or not. After closing the connection,
>>> the guest has a capability to read the data within timeout.
>> I don't understand the timeout part.
> The timeout is important, because of following situation:
> client sends to the guest big bunch of data and closes his end of socket.
> if we just destroy the connection on the qemu's side, the guest can't
> read remaining data in channel.
> (which can be much more than guest's buffer), although he would do it
> later.
> For this case timeout after POLLHUP is added. It is set after receiving
> POLLHUP and reset after each reading.
But why would one second be enough?
Paolo