Skip to content

Commit

Permalink
Enable messages debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlika committed Jun 23, 2024
1 parent f970f41 commit 0eee5ca
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions lib/uws-tracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,7 @@ export class UWebSocketsTracker {
}

if (debugMessagesEnabled) {
/* debugMessages(
"in",
userData.id === undefined
? "unknown peer"
: Buffer.from(userData.id).toString("hex"),
json,
);*/
debugMessages("in", json);
}

try {
Expand Down Expand Up @@ -346,12 +340,6 @@ export class UWebSocketsTracker {
function sendMessage(json: object, peerContext: SocketContext): void {
peerContext.ws.send(JSON.stringify(json), false, false);
if (debugMessagesEnabled) {
/* debugMessages(
"out",
peerContext.id === undefined
? "unknown peer"
: Buffer.from(peerContext.id).toString("hex"),
json,
);*/
debugMessages("out", json);
}
}

0 comments on commit 0eee5ca

Please sign in to comment.