Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Throws an error when trying to access the clients of a dynamic namespace
  • Loading branch information
0xClpz committed Oct 23, 2018
commit db4596a8383eee7e167d7d9cc41dabdb9683118c
3 changes: 3 additions & 0 deletions lib/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ Namespace.prototype.write = function(){
*/

Namespace.prototype.clients = function(fn){
if(!this.adapter){
throw new Error('No adapter for this namespace, are you trying to get the list of clients of a dynamic namespace?')
}
this.adapter.clients(this.rooms, fn);
// reset rooms for scenario:
// .in('room').clients() (GH-1978)
Expand Down