Skip to content

Commit 95713ae

Browse files
authored
Merge pull request #150 from MatrixAI/feature-fix-linting-errors
fix leftover linting errors
2 parents 4841b28 + f221c37 commit 95713ae

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

src/QUICClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,13 @@ class QUICClient {
141141
await crypto.ops.randomBytes(scidBuffer);
142142
const scid = new QUICConnectionId(scidBuffer);
143143
// Validating host and port types
144-
let [host_, udpType] = await utils.resolveHost(host, resolveHostname);
144+
const [tmpHost, udpType] = await utils.resolveHost(host, resolveHostname);
145145
const port_ = utils.toPort(port);
146146
// If the target host is in fact a zero IP, it cannot be used
147147
// as a target host, so we need to resolve it to a non-zero IP
148148
// in this case, 0.0.0.0 is resolved to 127.0.0.1 and :: and ::0 is
149149
// resolved to ::1.
150+
let host_ = tmpHost;
150151
host_ = utils.resolvesZeroIP(host_);
151152
let isSocketShared: boolean;
152153
if (socket == null) {

src/QUICSocket.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,11 @@ class QUICSocket {
396396
);
397397
}
398398
const host = params[index] as Host | Hostname;
399-
let [host_, udpType] = await utils.resolveHost(host, this.resolveHostname);
399+
const [tmpHost, udpType] = await utils.resolveHost(
400+
host,
401+
this.resolveHostname,
402+
);
403+
let host_ = tmpHost;
400404
host_ = utils.resolvesZeroIP(host_);
401405
host_ = utils.validateTarget(
402406
this._host,

src/QUICStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
577577
this.rejectReadableP = rejectReadableP;
578578
try {
579579
await readableP;
580-
} catch (e) {
580+
} catch {
581581
// If readableP was rejected then we just want to end early here,
582582
// anything rejecting it should already have errored the stream.
583583
return;

tests/QUICStream.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import * as utils from '#utils.js';
1212
import QUICServer from '#QUICServer.js';
1313
import QUICClient from '#QUICClient.js';
1414
import QUICStream from '#QUICStream.js';
15-
1;
15+
1616
describe(QUICStream.name, () => {
1717
const logger = new Logger(`${QUICStream.name} Test`, LogLevel.WARN, [
1818
new StreamHandler(

0 commit comments

Comments
 (0)