--- glib/glib/giowin32.c	2004-07-12 19:50:50.000000000 +1000
+++ glib-p1/glib/giowin32.c	2004-07-12 19:50:52.000000000 +1000
@@ -728,7 +728,12 @@
 
   SetEvent (channel->data_avail_noticed_event);
   if (channel->type == G_IO_WIN32_SOCKET)
+  {
+    /* tell select_thread() to exit */
+    channel->needs_close = 1;
+    /* wake up select_thread() from its blocking select() */
     send (channel->reset_send, send_buffer, sizeof (send_buffer), 0);
+  }
 
   g_io_channel_unref (watch->channel);
   UNLOCK (channel->mutex);
