Commit f3e1f5e
committed
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:
- #3662
- socketio/socket.io-postgres-adapter#161 parent e975492 commit f3e1f5e
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
0 commit comments