May be rewrite it this way?

```javascript
// Don't leak
if (this.freeSockets[name].length === 0)
  delete this.freeSockets[name];
```