Skip to content

Commit 52be374

Browse files
committed
Maybe don't get the error?
1 parent 11c6521 commit 52be374

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

index.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,11 @@ class NUClearNet extends EventEmitter {
128128
if (this._active) {
129129
try {
130130
this._net.process();
131-
} catch (err) {
132-
if (err instanceof Error) {
133-
// An error occurred during processing, disconnect.
134-
// Check if active again, since process happens asynchronously.
135-
if (this._active) {
136-
this.disconnect();
137-
}
131+
} catch {
132+
// An error occurred during processing, disconnect.
133+
// Check if active again, since process happens asynchronously.
134+
if (this._active) {
135+
this.disconnect();
138136
}
139137
}
140138
}

0 commit comments

Comments
 (0)