[jsonrpc-glib/jsonrpc-glib-3-26] output-stream: check for pending operations before flush
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jsonrpc-glib/jsonrpc-glib-3-26] output-stream: check for pending operations before flush
- Date: Tue, 12 Sep 2017 22:12:54 +0000 (UTC)
commit 667e3c8c9c786c8bf87426e22777b8dee7d930cc
Author: Christian Hergert <chergert redhat com>
Date: Tue Sep 12 14:59:35 2017 -0700
output-stream: check for pending operations before flush
src/jsonrpc-output-stream.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/jsonrpc-output-stream.c b/src/jsonrpc-output-stream.c
index e63719b..c1abb13 100644
--- a/src/jsonrpc-output-stream.c
+++ b/src/jsonrpc-output-stream.c
@@ -254,7 +254,8 @@ jsonrpc_output_stream_pump (JsonrpcOutputStream *self)
g_assert (JSONRPC_IS_OUTPUT_STREAM (self));
- if (priv->queue.length == 0)
+ if (priv->queue.length == 0 ||
+ g_output_stream_has_pending (G_OUTPUT_STREAM (self)))
return;
task = g_queue_pop_head (&priv->queue);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]