@@ -487,29 +487,29 @@ Example:
487487
488488## http.Agent
489489
490- In node 0.5.3+ there is a new implementation of the HTTP Agent which is used
490+ In node 0.5.3+ there is a new implementation of the HTTP Agent which is used
491491for pooling sockets used in HTTP client requests.
492492
493- Previously, a single agent instance help the pool for single host+port. The
493+ Previously, a single agent instance help the pool for single host+port. The
494494current implementation now holds sockets for any number of hosts.
495495
496- The current HTTP Agent also defaults client requests to using
497- Connection: keep-alive . If no pending HTTP requests are waiting on a socket
498- to become free the socket is closed. This means that node's pool has the
499- benefit of keep-alive when under load but still does not require developers
496+ The current HTTP Agent also defaults client requests to using
497+ Connection: keep-alive . If no pending HTTP requests are waiting on a socket
498+ to become free the socket is closed. This means that node's pool has the
499+ benefit of keep-alive when under load but still does not require developers
500500to manually close the HTTP clients using keep-alive.
501501
502- Sockets are removed from the agent's pool when the socket emits either a
503- "close" event or a special "agentRemove" event. This means that if you intend
504- to keep one HTTP request open for a long time and don't want it to stay in the
502+ Sockets are removed from the agent's pool when the socket emits either a
503+ "close" event or a special "agentRemove" event. This means that if you intend
504+ to keep one HTTP request open for a long time and don't want it to stay in the
505505pool you can do something along the lines of:
506506
507507 http.get(options, function(res) {
508508 // Do stuff
509509 }).on("socket", function (socket) {
510510 socket.emit("agentRemove");
511511 });
512-
512+
513513Alternatively, you could just opt out of pooling entirely using ` agent:false ` :
514514
515515 http.get({host:'localhost', port:80, path:'/', agent:false}, function (res) {
0 commit comments