Skip to content

Commit

Permalink
chore: debug broadcastMessage on prod
Browse files Browse the repository at this point in the history
  • Loading branch information
ynwd committed Dec 4, 2024
1 parent 0c10a5e commit e7069b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/socket/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function socketModule(s: Fastro) {
const c = ctx.stores.get("connected");
if (!c) return;
const entries = c.entries().toArray();
console.log("broadcastMessage:", entries);
// console.log("broadcastMessage:", entries);
if (entries) {
for (const key in entries) {
const [, { value: { socket } }] = entries[key];
Expand All @@ -37,7 +37,7 @@ export default function socketModule(s: Fastro) {
const c = ctx.stores.get("connected");
if (!c) return;
const entries = c.entries().toArray();
console.log("broadcastConnection", entries);
// console.log("broadcastConnection", entries);
const connected = Array.from(entries).map(([, { value }]) => ({
username: value.data.username,
room: value.data.room,
Expand All @@ -58,7 +58,7 @@ export default function socketModule(s: Fastro) {
data: Data,
) {
const connected = ctx.stores.get("connected");
// console.log("connected", connected);
console.log("connected", connected);
if (data.user) {
connected?.set(data.user, { data, socket });
}
Expand Down

0 comments on commit e7069b7

Please sign in to comment.