Open neitomic opened 6 days ago
@sonhmai noticed this after merged the timeout PR
Interesting question!
The UDP socket is stateless and it's still open, the server can still send the response back after some time, so there will be a problem if another request reuse the socket and read the response of the old request.
The UDP socket is stateless and it's still open, the server can still send the response back after some time, so there will be a problem if another request reuse the socket and read the response of the old request.
good observation, can be a real problem if it happens that way 🤔
https://github.com/neitomic/doh-server/blob/ec14e60c22a06f4774cb89f894fb05dcfe0981c7/src/dns/mod.rs#L46
Since the Socket is cached, what happens if the server send the response after the timeout?
Related to #20