Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/src/rpc/dial.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@ Future<String> _searchMdns(String address) async {
} else if (event.type == BonsoirDiscoveryEventType.discoveryServiceResolved) {
final service = event.service! as ResolvedBonsoirService;
if (service.name == targetName && service.host != null) {
final host = service.host!.substring(0, service.host!.length - 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stuqdog I am VERY curious as to why we were doing this in the first place

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good question! The service.host doesn't appear as an IP address on ios but as a human readable address, the operating theory is that it has a lingering . at the end of it that we wanted to strip. However, @Otterverse tested on ios as well and android and found that not stripping the trailing character allowed for successful connection on both ios and android. So I think this was a case of being over-cautious on iOS in a way that broke android.

localAddress = '$host:${service.port}';
localAddress = '${service.host!}:${service.port}';
}
}
});
Expand Down