joyent/node — Issue #2069: resource leak http.js
Author: quexer
Created: 2011-11-11 02:30:00+00:00
State: open

Here're codes from **"Agent.prototype.removeSocket"** in http.js

```javascript
...

if (this.sockets[name]) {
var index = this.sockets[name].indexOf(s);
if (index !== -1) {
this.sockets[name].splice(index, 1);
}
} else if (this.sockets[name] && this.sockets[name].length === 0) {
// don't leak
delete this.sockets[name];
delete this.requests[name];
}

...
```

The **"else if"** branch is unreachable.