glib2: fix hang on gsocket