Skip to content

Commit

Permalink
fix: use keepAlive for http 1.1 (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
tripodsan authored Dec 7, 2023
1 parent 427cf74 commit a30053f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MediaHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import crypto from 'crypto';
import { PassThrough, Transform } from 'stream';

import {
AbortError, context, h1, timeoutSignal,
AbortError, context, keepAlive, timeoutSignal,
} from '@adobe/fetch';
import wrapFetch from 'fetch-retry';
import mime from 'mime';
Expand Down Expand Up @@ -143,7 +143,7 @@ export default class MediaHandler {
this.fetchContext = fetchDefaultContext;
/* c8 ignore next */
if (opts.forceHttp1 || process.env.HELIX_FETCH_FORCE_HTTP1) {
this.fetchContext = h1({
this.fetchContext = keepAlive({
maxCacheSize: FETCH_CACHE_SIZE,
});
}
Expand Down

0 comments on commit a30053f

Please sign in to comment.