On Fri, Apr 26, 2013 at 10:47:25AM +0800, Liu Ping Fan wrote: > +static gboolean vde_handler(gpointer data) > +{ > + EventGSource *nsrc = (EventGSource *)data; > + > + if (nsrc->gfd.revents & G_IO_IN) {
The VDE file descriptor is a socket. Please use the full G_IO_IN | G_IO_HUP | G_IO_ERR set which is equivalent to select(2) rfds. This ensures we handle errors and disconnect.