[gnome-network-displays/cc-tmp: 27/80] cc: concise check




commit a49cd40665ff77d9971d07c624c8641d118bb19a
Author: Benjamin Berg <benjamin sipsolutions net>
Date:   Sat Sep 3 10:02:19 2022 +0000

    cc: concise check

 src/cc/cc-comm.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/cc/cc-comm.c b/src/cc/cc-comm.c
index 0e3b9e2..72d62c1 100644
--- a/src/cc/cc-comm.c
+++ b/src/cc/cc-comm.c
@@ -193,19 +193,8 @@ cc_comm_message_read_cb (GObject      *source_object,
   if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
     return;
 
-  // XXX: should we give up or keep on retrying if errors pop up
-  /*
-   * If this error is for an old connection (that should be closed already),
-   * then just give up immediately with a CLOSED error.
-   */
-  if (comm->con &&
-      g_io_stream_get_input_stream (G_IO_STREAM (comm->con)) != G_INPUT_STREAM (source_object))
-    {
-      g_error ("CcComm: Error on old read connection, ignoring.");
-      // cc_comm_listen (comm);
-      return;
-    }
-
+  g_assert (comm->con);
+  g_assert (G_INPUT_STREAM (source_object) == g_io_stream_get_input_stream (G_IO_STREAM (comm->con)));
   if (!success || io_bytes == 0)
     {
       if (error)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]