there is a race condition between the original timeout handling here and
the socket's timeout event, which may fire if the user is passing in an
agent that has a timeout set. by using request.setTimeout and adding a
listener for the timeout event, we consolidate our timeout handling and
remove this race condition.
there is a race condition between the original timeout handling here and the socket's timeout event, which may fire if the user is passing in an agent that has a timeout set. by using request.setTimeout and adding a listener for the timeout event, we consolidate our timeout handling and remove this race condition.
References