Automattic/socket.io — pull request #1646 by narcisoguillen (2014-06-24 01:08:40+00:00)
Title: Close sio

Wen creating a new Server with a port

```js
var PORT = 3030;
var sio = require('socket.io')(PORT);
```

socket.io is creating a new http server https://github.com/Automattic/socket.io/blob/master/lib/index.js#L209 when only sending a PORT. This will allow to close this server

Currently

```js
var PORT = 3030;
var sio = require('socket.io')(PORT);

sio.engine.close();

var sio = require('socket.io')(PORT);

Error: listen EADDRINUSE
```