Skip to content

Commit

Permalink
replace let with const
Browse files Browse the repository at this point in the history
  • Loading branch information
EnriqCG committed Nov 25, 2023
1 parent 9969e35 commit 6e740bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class RCON {
// Hack to cope with multipacket responses.
// see https://developer.valvesoftware.com/wiki/Talk:Source_RCON_Protocol#How_to_receive_split_response?
if (decodedPacket.size > 3700) {
let encodedTerminationPacket = packets.encode(protocol.SERVERDATA_RESPONSE_VALUE, protocol.ID_TERM, '');
const encodedTerminationPacket = packets.encode(protocol.SERVERDATA_RESPONSE_VALUE, protocol.ID_TERM, '');
this.connection.write(encodedTerminationPacket);
} else if (decodedPacket.size <= 3700) { // no need to check for ID_TERM here, since this packet will always be < 3700
this.connection.removeListener('data', onData);
Expand Down

0 comments on commit 6e740bc

Please sign in to comment.