Skip to content

Commit

Permalink
chore: properly declare timeoutId
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed Jan 17, 2025
1 parent 380311c commit 5a9057a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ class TLSTransport implements Transport {
servername: nameserver.split(':')[0], // Required for SNI
}

let timeoutId: ReturnType<typeof setTimeout>

const socket = tls.connect(options, () => {
if (!socket.authorized) {
socket.destroy()
Expand All @@ -181,8 +183,6 @@ class TLSTransport implements Transport {
message.set(lengthPrefix)
message.set(requestData, lengthPrefix.length)

let timeoutId: ReturnType<typeof setTimeout>

// Write the combined message
socket.write(message, (err) => {
if (err) {
Expand Down

0 comments on commit 5a9057a

Please sign in to comment.