Add connection destroy logic
[platform/core/connectivity/bluetooth-agent.git] / ipsp-agent / bluetooth-ipsp-agent.c
index cd6f471..32a41db 100644 (file)
@@ -709,6 +709,10 @@ static void __bt_ipsp_dbus_method(GDBusConnection *connection,
 
                __bt_ipsp_execute_dhcp6_server();
 
+               if (net_connection) {
+                       connection_destroy(net_connection);
+                       net_connection = NULL;
+               }
        } else if (g_strcmp0(method_name, "SetIpv6Addr") == 0) {
                int ret;
                BT_DBG("");