+1
−1
+8
−0
+1
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
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