Skip to content

Commit 189c7cd

Browse files
committed
fix: get signal from options
1 parent 7a9c338 commit 189c7cd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/health.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export class Health {
3030

3131
const requestURL = new URL(cluster.server + path);
3232
const requestInit = await this.config.applyToFetchOptions(opts);
33-
const controller = new AbortController();
34-
requestInit.signal = controller.signal as AbortSignal;
33+
if (opts.signal) {
34+
requestInit.signal = opts.signal;
35+
}
3536
requestInit.method = 'GET';
3637

3738
try {

0 commit comments

Comments
 (0)