[jsonrpc-glib] client: don't duplicate close call
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jsonrpc-glib] client: don't duplicate close call
- Date: Mon, 19 Feb 2018 21:43:13 +0000 (UTC)
commit 5b314d52ff3badea0b8e7249ffe8b737ee9550bb
Author: Christian Hergert <chergert redhat com>
Date: Mon Feb 19 13:41:04 2018 -0800
client: don't duplicate close call
If we got the shutdown/cancelled notification, then we don't need to try
to reclose the stream.
src/jsonrpc-client.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/jsonrpc-client.c b/src/jsonrpc-client.c
index 4465fe2..518b92e 100644
--- a/src/jsonrpc-client.c
+++ b/src/jsonrpc-client.c
@@ -648,11 +648,9 @@ jsonrpc_client_call_read_cb (GObject *object,
if (!jsonrpc_input_stream_read_message_finish (stream, result, &message, &error))
{
/* Handle jsonrpc_client_close() conditions gracefully. */
- if (priv->in_shutdown && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- {
- g_io_stream_close (priv->io_stream, NULL, NULL);
- return;
- }
+ if (priv->in_shutdown &&
+ g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ return;
/*
* If we fail to read a message, that means we couldn't even receive
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]