Otherwise the channel will close it again when being deallocated.
---
 gweb/gweb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gweb/gweb.c b/gweb/gweb.c
index f6828cf..dcb0549 100644
--- a/gweb/gweb.c
+++ b/gweb/gweb.c
@@ -1075,7 +1075,8 @@ static int connect_session_transport(struct web_session 
*session)
                        session->addr->ai_addrlen) < 0) {
                if (errno != EINPROGRESS) {
                        debug(session->web, "connect() %s", strerror(errno));
-                       close(sk);
+                       g_io_channel_unref(session->transport_channel);
+                       session->transport_channel = NULL;
                        return -EIO;
                }
        }
-- 
1.8.3.2

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to