Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5d2a1071 authored by Mike Yu's avatar Mike Yu
Browse files

DoH: Change Network to use try_send

As send() blocks until channel has capacity, Dispatcher gets blocked
at sending commands to a Network object if the Network's mpsc channel
has no capacity. This happens when there are excess DNS requests while
the connection has not been established. Therefore, change all the DoH
code to use try_send() that returns an error immediate if the channel
is full.

If a Network's mpsc channel has no capacity, DNS query threads that
called doh_query() with the associated net_id will get DOH_RESULT_CAN_NOT_SEND
error immediately. Since it's not a timeout error, they will try DoT.

Bug: 207301204
Test: cd packages/modules/DnsResolver && atest
Change-Id: I9575e6f410b8b552c07af15284b67b305ecce6b9
parent 4bdc8678
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment