Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure it is accessing the rooms map #18

Merged
merged 1 commit into from
Jan 22, 2020
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
make sure it is accessing the rooms map
adding the this keyword we make sure we are accessing the rooms map property instead of local list of room names
  • Loading branch information
jodinathan authored Jan 22, 2020
commit 5930e84e706b11d0244911ac50fe2446c86b9424
4 changes: 2 additions & 2 deletions lib/src/adapter/adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class _MemoryStoreAdapter extends EventEmitter implements Adapter {
encoder.encode(packet, (encodedPackets) {
if (rooms.isNotEmpty) {
for (var i = 0; i < rooms.length; i++) {
var room = rooms[rooms[i]];
var room = this.rooms[rooms[i]];
if (room == null) continue;
var sockets = room.sockets;
for (var id in sockets.keys) {
Expand Down Expand Up @@ -170,7 +170,7 @@ class _MemoryStoreAdapter extends EventEmitter implements Adapter {

if (rooms.isNotEmpty) {
for (var i = 0; i < rooms.length; i++) {
var room = rooms[rooms[i]];
var room = this.rooms[rooms[i]];
if (room == null) continue;
var sockets = room.sockets;
for (var id in sockets.keys) {
Expand Down