Use close instead of shutdown.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Fri, 3 Jul 2009 17:25:21 +0000 (14:25 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Fri, 3 Jul 2009 18:37:32 +0000 (15:37 -0300)
The difference is that close will push the remaining data to be sent
before closing the connection.

hcconn.c

index 3e3f52f..aac7cc1 100644 (file)
--- a/hcconn.c
+++ b/hcconn.c
@@ -97,7 +97,7 @@ hc_conn_channel_close (gpointer data)
   struct channel_layer *layer = data;
   int fd = g_io_channel_unix_get_fd (layer->channel);
   g_source_remove (layer->watch);
-  shutdown (fd, SHUT_RDWR);
+  close (fd);
   g_io_channel_unref (layer->channel);
   g_slice_free (struct channel_layer, layer);
 }