Browse Source

connection: close on checkResponseTime

Leszek Wiesner 3 years ago
parent
commit
938b9ebf76
1 changed files with 6 additions and 1 deletions
  1. 6 1
      distributor-node/src/services/networking/NetworkingService.ts

+ 6 - 1
distributor-node/src/services/networking/NetworkingService.ts

@@ -320,7 +320,12 @@ export class NetworkingService {
     this.logger.debug(`Sending storage node response-time check request to: ${endpoint}`, { endpoint })
     try {
       // TODO: Use a status endpoint once available?
-      await axios.get(endpoint, { timeout: STORAGE_NODE_ENDPOINT_CHECK_TIMEOUT })
+      await axios.get(endpoint, {
+        timeout: STORAGE_NODE_ENDPOINT_CHECK_TIMEOUT,
+        headers: {
+          connection: 'close',
+        },
+      })
       throw new Error('Unexpected status 200')
     } catch (err) {
       if (axios.isAxiosError(err) && err.response?.status === 404) {