You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using spdy.createAgent method to create a http agent that im reusing for a number of outbound http requests to a server. This is working great but i can't figure out how to handle cases when the tcp connection to the server disconnects after it's been established so i can reconnect and start over.
I can only seem to get the error event on the agent to fire if i start the client when the server if already down. If i start the client with a working server then disconnect the server the client will continue to try and make requests without any errors from either the agent or client request.
varagent=spdy.createAgent({
...
});//intuition: once agent is connected, connection is not null but a proper objectagent.on('_connect',function(){//we should not be doing this as _spdyState is meant to be an internal to the library...agent._spdyState.connection.on('close',function(){console.log('closed connection');})})
I'm using
spdy.createAgent
method to create a http agent that im reusing for a number of outbound http requests to a server. This is working great but i can't figure out how to handle cases when the tcp connection to the server disconnects after it's been established so i can reconnect and start over.I can only seem to get the
error
event on the agent to fire if i start the client when the server if already down. If i start the client with a working server then disconnect the server the client will continue to try and make requests without any errors from either the agent or client request.Any suggestions?
See example:
The text was updated successfully, but these errors were encountered: