[gnome-network-displays/cc-tmp: 32/80] cc: concise check in header
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-network-displays/cc-tmp: 32/80] cc: concise check in header
- Date: Fri, 9 Sep 2022 12:03:50 +0000 (UTC)
commit f0a813967ef35e44d441cc48044fb687cad96a22
Author: Anupam Kumar <kyteinsky gmail com>
Date: Sat Sep 3 15:45:08 2022 +0530
cc: concise check in header
src/cc/cc-comm.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/cc/cc-comm.c b/src/cc/cc-comm.c
index e85e84c..f74a9c2 100644
--- a/src/cc/cc-comm.c
+++ b/src/cc/cc-comm.c
@@ -157,18 +157,8 @@ cc_comm_header_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 != 4)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]