Diff between 1adcdc84d6a8400fec9c10c97b72269cc648e649 and 4deec93e686f8f9bfd78a6df7afd2d0f9bde0115

Changed Files

File Additions Deletions Status
src/shared/io-glib.c +5 -0 modified

Full Patch

diff --git a/src/shared/io-glib.c b/src/shared/io-glib.c
index a2ada66..5ebde3d 100644
--- a/src/shared/io-glib.c
+++ b/src/shared/io-glib.c
@@ -115,6 +115,11 @@ void io_destroy(struct io *io)
 		io->write_watch = 0;
 	}
 
+	if (io->disconnect_watch > 0) {
+		g_source_remove(io->disconnect_watch);
+		io->disconnect_watch = 0;
+	}
+
 	g_io_channel_unref(io->channel);
 	io->channel = NULL;