[sheepdog] [PATCH] net: connection shouldn't be closed on EINTR error
Liu Yuan
namei.unix at gmail.com
Thu Jan 31 07:42:00 CET 2013
On 01/31/2013 12:49 PM, MORITA Kazutaka wrote:
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
> lib/net.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/net.c b/lib/net.c
> index 596f9a9..1a823a1 100644
> --- a/lib/net.c
> +++ b/lib/net.c
> @@ -79,7 +79,7 @@ int rx(struct connection *conn, enum conn_state next_state)
> }
>
> if (ret < 0) {
> - if (errno != EAGAIN)
> + if (errno != EAGAIN && errno != EINTR)
> conn->c_rx_state = C_IO_CLOSED;
> return 0;
> }
> @@ -99,7 +99,7 @@ notrace int tx(struct connection *conn, enum conn_state next_state)
>
> ret = write(conn->fd, conn->tx_buf, conn->tx_length);
> if (ret < 0) {
> - if (errno != EAGAIN)
> + if (errno != EAGAIN && errno != EINTR)
> conn->c_tx_state = C_IO_CLOSED;
> return 0;
> }
>
Applied, thanks.
Yuan
More information about the sheepdog
mailing list