1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

client: dns-sort: classify on no source if dest ads

This commit is contained in:
Andy Green 2021-01-05 08:27:25 +00:00
parent cb1e893e2d
commit cef8ce81f7

View file

@ -463,6 +463,11 @@ lws_sort_dns_dcomp(const lws_dns_sort_t *da, const lws_dns_sort_t *db)
* Label(Source(DB)) = Label(DB), then prefer DB
*/
if (!da->source)
return SAS_PREFER_B;
if (!db->source)
return SAS_PREFER_A;
lws_sort_dns_classify(&da->source->dest, &score_srca);
lws_sort_dns_classify(&db->source->dest, &score_srcb);