Skip to content

Commit 0eb6fed

Browse files
authored
docs: fix example in README (#368)
1 parent 5f2de9b commit 0eb6fed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ that a regular `Adapter` does not
186186
Returns the list of socket IDs connected to `rooms` across all nodes. See [Namespace#allSockets()](https://socket.io/docs/v3/server-api/#namespace-allSockets)
187187

188188
```js
189-
const sockets = await io.of('/').adapter.sockets();
189+
const sockets = await io.of('/').adapter.sockets(new Set());
190190
console.log(sockets); // a Set containing all the connected socket ids
191191

192192
const sockets = await io.of('/').adapter.sockets(new Set(['room1', 'room2']));

0 commit comments

Comments
 (0)