Skip to content

Commit

Permalink
more coercion to string
Browse files Browse the repository at this point in the history
  • Loading branch information
dolled-possum committed Jan 4, 2025
1 parent d8ede30 commit 070a368
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ wss.on('connection', (clientSocket, req, remoteSocket) => {
const textData = data.toString(); // Convert Buffer to string
clientSocket.send(textData);
} else {
clientSocket.send(data); // Forward text messages directly
const textData = data.toString(); // Convert Buffer to string
clientSocket.send(textData);
//clientSocket.send(data); // Forward text messages directly
}
});

Expand Down

0 comments on commit 070a368

Please sign in to comment.