Diff between 340a7b043a4c891aa0fccd8dadc1c2a8957985c3 and 1c1f807c304a77ae4965f00ccee04fdbe7415d5e

Changed Files

File Additions Deletions Status
mesh/main.c +3 -2 modified

Full Patch

diff --git a/mesh/main.c b/mesh/main.c
index 7c72f49..d991c9f 100644
--- a/mesh/main.c
+++ b/mesh/main.c
@@ -949,7 +949,6 @@ static void mesh_session_setup(GDBusProxy *proxy)
 		data_out_notify(connection.data_out, true, notify_prov_out_cb);
 
 	} else if (connection.type != CONN_TYPE_INVALID){
-
 		connection.data_in = get_characteristic(proxy,
 						MESH_PROXY_DATA_IN_UUID_STR);
 		if (!connection.data_in)
@@ -1202,8 +1201,10 @@ static void property_changed(GDBusProxy *proxy, const char *name,
 				if (connected && connection.device == NULL)
 					set_connected_device(proxy);
 				else if (!connected &&
-						connection.device == proxy)
+						connection.device == proxy) {
+					net_session_close(connection.data_in);
 					set_connected_device(NULL);
+				}
 			} else if ((strcmp(name, "Alias") == 0) &&
 						connection.device == proxy) {
 				/* Re-generate prompt */