DNSBridge no function clause crash
When running with dns_bridge_recursive: true, it's possible to get this crash with a regular DNS lookup:
20:08:46.153 [error] GenServer MdnsLite.DNSBridge terminating
** (FunctionClauseError) no function clause matching in :mdns_lite_inet_dns.encode_res_section/3
(mdns_lite 0.8.8) src/mdns_lite_inet_dns.erl:303: :mdns_lite_inet_dns.encode_res_section(<<0, 51, 129, 128, 0, 1, 0, 1, 0, 0, 0, 1, 3, 97, 112, 105, 13, 112, 105, 114, 97, 116, 101, 119, 101, 97, 116, 104, 101, 114, 3, 110, 101, 116, 0, 0, 1, 0, 1, 192, 12, 0, 1, 0, 1, 0, 0, 0, 60, 0, ...>>, {3, {["api", "pirateweather", "net"], 12, nil, {["pirateweather", "net"], 16, {["net"], 30, nil, nil}, nil}}}, [{:dns_rr_opt, ~c".", :opt, 512, 0, 0, 0, "", false}])
One fix is to set dns_bridge_recursive: false and avoid the problematic code.
This issue is to track whether to fix dns_bridge_recursive: true or to remove :dns_bridge_recursive completely since the OTP bug that motivated it has been fixed.
We could just ignore the option and behavior if we detect the OTP version in use is one with the fix?
I'm pretty sure you're right. It does seem very desirable to handle this workaround internally and not bother users about it. I just wanted to take a bit of time to refresh my memory on the original issue and OTP DNS resolution before making a PR to remove it.