Hi, recently I wondered the question about what would happen if http timeout but the request is still sent out.
The motive is, let's assume we make a post request with a timeout. When timeout, the request is canceled, and the server won't serve it anymore.
However, if the request is sent out when timeout, the server actually proceeds it anyway, which may make an unexpected error.
So I would like to know how to avoid such an error. Do we need to additional check in the application layer, or could we check it inside the http library?
In my opinion, the socket is closed once the timeout happens, and the
n, err = w.pc.conn.Write(p) will always fail as
use of closed network connection.
However, the result is it could send out the bytes, I guess it's caused by the debugger, but have no idea about it.