Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const checkDone = ({
response,
packetLength,
socket,
resolve,
}: ICheckDoneParams) => {
// Why + TWO_BYTES? See comment in query()
if (response.length === packetLength + TWO_BYTES) {
socket.destroy();
resolve(dnsPacket.streamDecode(response));
}
};