Files
socket.io/packages
Damien Arrachequesne f3e1f5ebdf fix(sio): call adapter.init() when creating each namespace
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
2025-10-09 09:48:07 +02:00
..