From 8a7487cf50ec374aa1a05fce60e245110fcb9970 Mon Sep 17 00:00:00 2001 From: Damien Albisson Date: Fri, 17 May 2024 12:09:21 +0200 Subject: [PATCH] Accept any answer of a platform --- lib/data/utils.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/data/utils.dart b/lib/data/utils.dart index 02a5e64..a280bda 100644 --- a/lib/data/utils.dart +++ b/lib/data/utils.dart @@ -288,7 +288,6 @@ Future checkIfConnectionValid(BuildContext context, String name, String ho Future> platformDiscovery() async { List<(InternetAddress, int)> ipPort = []; - String waitedAnswer = '{"name": "panduza_platform","version": 1.0}'; // Could have some problem with some android phone ? List listInterface = await NetworkInterface.list(); @@ -304,9 +303,7 @@ Future> platformDiscovery() async { String answer = utf8.decode(datagram.data); // Here send the port of platform and not broker, how to get the port of the broker ? - if(answer == waitedAnswer) { - if (!ipPort.contains((datagram.address, datagram.port))) ipPort.add((datagram.address, datagram.port)); - } + if (!ipPort.contains((datagram.address, datagram.port))) ipPort.add((datagram.address, datagram.port)); } });