mirror of
https://github.com/socketio/socket.io.git
synced 2026-01-08 22:48:20 -05:00
The init() method of the adapter will now be called when creating a namespace with `io.of(<the-namespace>)`.
Note: any promise rejection is silently caught, as I don't see how we could properly expose the promise.
```js
const io = new Server({
adapter: myAdapter
});
// under the hood, this:
// - implicitly creates the main namespace (/)
// - creates an instance of `myAdapter` for the main namespace
// - calls `myAdapter.init()` (with this change)
```
Related:
- https://github.com/socketio/socket.io/issues/3662
- https://github.com/socketio/socket.io-postgres-adapter/issues/16