From 829666acc0b24112ef3ccf05ed0646cfd51faf66 Mon Sep 17 00:00:00 2001 From: Samuel Ortiz Date: Fri, 24 Sep 2010 17:18:34 +0200 Subject: [PATCH] Remove the DNS TCP listener watch when the socket is closed --- plugins/dnsproxy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/dnsproxy.c b/plugins/dnsproxy.c index 28c8ef0..1b7cd32 100644 --- a/plugins/dnsproxy.c +++ b/plugins/dnsproxy.c @@ -862,8 +862,12 @@ static gboolean tcp_listener_event(GIOChannel *channel, GIOCondition condition, DBG("condition 0x%x", condition); if (condition & (G_IO_NVAL | G_IO_ERR | G_IO_HUP)) { - connman_error("Error with TCP listener channel"); + if (tcp_listener_watch > 0) + g_source_remove(tcp_listener_watch); tcp_listener_watch = 0; + + connman_error("Error with TCP listener channel"); + return FALSE; } -- 2.7.4