Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.16.0
-
None
-
Windows 10. Visual Studio 2022 17.3.
Description
We have some software that communicates with a hardware device using Thrift.
The software was until recently using Thrift 0.9.x (I know - old), and this worked fine.
Thrift 0.16.0 worked fine when communicating over the office network but the code failed when communicating with the device over a second NIC where there was no DNS entry. Thrift 0.9 was ok with this scenario.
I've now got a workaround but the 3 constructors for TSocketTransport seem inconsistent. and could possibly work better. Details in the attached file.
This is the gist
var host = "xyz"; var hostAddress = "192.168.1.109"; var port = 9090; // NOTE: FailsNoSuchHost fails for an internal network to a hardware device // which doesn't have a DNS entry. Nslookup returns nothing and DNS.GetHostEntry(...) throws // ok - there's no host entry so I guess this should fail await FailsNoSuchHost(host, port); // not ok - I'm specifying the IP explicitly, I don't expect this to fail await FailsNoSuchHost(hostAddress, port); // this works by creating an IPAddress, but is inconsistent because // I have to explicity open the socket await CreateAddressSucceeds(hostAddress, port); // this works by creating a TcpClient, but I fails if I explicitly open the socket await CreateClientSucceeds(hostAddress, port);
Attachments
Attachments
Issue Links
- links to