If receive returns an error report it using CLOSE event.
[cascardo/rnetproxy.git] / hcconn.c
index af658ca..10d01a8 100644 (file)
--- a/hcconn.c
+++ b/hcconn.c
@@ -119,6 +119,11 @@ hc_conn_watch (GIOChannel *channel, GIOCondition cond, gpointer data)
         {
           event = HC_EVENT_CLOSE;
         }
+      else if (r == -1)
+        {
+          /* FIXME: create HC_EVENT_ERROR */
+          event = HC_EVENT_CLOSE;
+        }
     }
   else if (cond & G_IO_HUP)
     {