The extra buffer used to decode the strings sent by the client in the legacy ping protocol was never released. However, creating an extra copy of the buffer just to decode it to a string isn't actually necessary: We can just call toString() directly on the original buffer. Additionally, free the buffer in handlerRemoved() to handle cases where the client never sends enough bytes to form a valid legacy ping request.
5.9 KiB
5.9 KiB